1 |
# Project Name |
2 |
project(Pcsx2) |
3 |
|
4 |
# There is some incompatible change with version 2.6 and below ! |
5 |
cmake_minimum_required(VERSION 2.8) |
6 |
|
7 |
# Variable to check that people use the good file |
8 |
set(TOP_CMAKE_WAS_SOURCED TRUE) |
9 |
|
10 |
# Print a clear message that 64bits is not supported |
11 |
# It would avoid compilation failure later. |
12 |
if(CMAKE_SIZEOF_VOID_P MATCHES "8") |
13 |
message(FATAL_ERROR " |
14 |
PCSX2 does not support 64bits environment. Please install a 32bits chroot or a 32bits OS. |
15 |
PCSX2 have neither no plan to support the 64bits architecture in the future. |
16 |
It will need a complete rewrite of the core emulator and a lots of time |
17 |
|
18 |
However when linux distribution will support properly multi-arch package, it will |
19 |
be at least possible to easily compile and install PCSX2 witout too much hassle (the chroot environment)") |
20 |
endif(CMAKE_SIZEOF_VOID_P MATCHES "8") |
21 |
|
22 |
|
23 |
# set module path |
24 |
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) |
25 |
|
26 |
# include some generic functions |
27 |
include(Pcsx2Utils) |
28 |
|
29 |
# Detect current OS |
30 |
detectOperatingSystem() |
31 |
|
32 |
#------------------------------------------------------------------------------- |
33 |
# Include specific module |
34 |
# BuildParameters Must be done before SearchForStuff |
35 |
include(BuildParameters) |
36 |
# SearchForStuff be done before SelectPcsx2Plugins |
37 |
include(SearchForStuff) |
38 |
include(SelectPcsx2Plugins) |
39 |
|
40 |
# add additional project-wide include directories |
41 |
include_directories(${PROJECT_SOURCE_DIR}/common/include |
42 |
${PROJECT_SOURCE_DIR}/common/include/Utilities |
43 |
${PROJECT_SOURCE_DIR}/common/include/x86emitter) |
44 |
|
45 |
# make 3rdParty |
46 |
if(EXISTS "${PROJECT_SOURCE_DIR}/3rdparty") |
47 |
add_subdirectory(3rdparty) |
48 |
endif(EXISTS "${PROJECT_SOURCE_DIR}/3rdparty") |
49 |
|
50 |
# make common |
51 |
if(common_libs) |
52 |
add_subdirectory(common/src/Utilities) |
53 |
add_subdirectory(common/src/x86emitter) |
54 |
endif(common_libs) |
55 |
|
56 |
# make tools |
57 |
add_subdirectory(tools) |
58 |
|
59 |
# make pcsx2 |
60 |
if(EXISTS "${PROJECT_SOURCE_DIR}/pcsx2" AND pcsx2_core) |
61 |
add_subdirectory(pcsx2) |
62 |
endif(EXISTS "${PROJECT_SOURCE_DIR}/pcsx2" AND pcsx2_core) |
63 |
|
64 |
# make plugins |
65 |
if(EXISTS "${PROJECT_SOURCE_DIR}/plugins") |
66 |
add_subdirectory(plugins) |
67 |
endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins") |
68 |
|
69 |
#------------------------------------------------------------------------------- |
70 |
# Resources |
71 |
#------------------------------------------------------------------------------- |
72 |
# Specify all binary images to convert them into c/c++ header files. |
73 |
# |
74 |
#------------------------------------------------------------------------------- |
75 |
# add resources here |
76 |
set(resourceList AppIcon16.png |
77 |
AppIcon32.png |
78 |
AppIcon64.png |
79 |
BackgroundLogo.png |
80 |
ButtonIcon_Camera.png |
81 |
ConfigIcon_Cpu.png |
82 |
ConfigIcon_Gamefixes.png |
83 |
ConfigIcon_MemoryCard.png |
84 |
ConfigIcon_Paths.png |
85 |
ConfigIcon_Plugins.png |
86 |
ConfigIcon_Speedhacks.png |
87 |
ConfigIcon_Video.png |
88 |
Dualshock.jpg) |
89 |
|
90 |
createResourceTarget(${resourceList}) |
91 |
#------------------------------------------------------------------------------- |
92 |
|