/[pcsx2_0.9.7]/trunk/CMakeLists.txt
ViewVC logotype

Annotation of /trunk/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 401 - (hide annotations) (download)
Fri Feb 25 17:31:09 2011 UTC (8 years, 8 months ago) by william
File MIME type: text/plain
File size: 2728 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.4358 local: v0.9.7.313-latest) in ./trunk
1 william 31 # Project Name
2     project(Pcsx2)
3    
4 william 62 # There is some incompatible change with version 2.6 and below !
5     cmake_minimum_required(VERSION 2.8)
6 william 31
7 william 62 # Variable to check that people use the good file
8     set(TOP_CMAKE_WAS_SOURCED TRUE)
9 william 31
10 william 62 # Print a clear message that 64bits is not supported
11     # It would avoid compilation failure later.
12 william 401 # Note: disable the failure in package mode
13     if(NOT PACKAGE_MODE)
14     if(CMAKE_SIZEOF_VOID_P MATCHES "8")
15     message(FATAL_ERROR "
16     PCSX2 does not support 64bits environment. Please install a 32bits chroot or a 32bits OS.
17     PCSX2 have neither no plan to support the 64bits architecture in the future.
18     It will need a complete rewrite of the core emulator and a lots of time
19    
20     However when linux distribution will support properly multi-arch package, it will
21     be at least possible to easily compile and install PCSX2 witout too much hassle (the chroot environment)")
22     endif(CMAKE_SIZEOF_VOID_P MATCHES "8")
23     endif(NOT PACKAGE_MODE)
24    
25     # 64 bits specific configuration
26 william 62 if(CMAKE_SIZEOF_VOID_P MATCHES "8")
27 william 401 # Do not search library in /usr/lib64
28     SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS OFF)
29     # Probably useless but it will not harm
30     SET_PROPERTY(GLOBAL PROPERTY COMPILE_DEFINITIONS "-m32")
31 william 62 endif(CMAKE_SIZEOF_VOID_P MATCHES "8")
32    
33 william 31 # set module path
34     set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
35    
36 william 62 # include some generic functions
37     include(Pcsx2Utils)
38 william 31
39 william 62 # Detect current OS
40     detectOperatingSystem()
41 william 31
42     #-------------------------------------------------------------------------------
43 william 62 # Include specific module
44     # BuildParameters Must be done before SearchForStuff
45     include(BuildParameters)
46     # SearchForStuff be done before SelectPcsx2Plugins
47 william 31 include(SearchForStuff)
48 william 62 include(SelectPcsx2Plugins)
49 william 31
50     # add additional project-wide include directories
51 william 62 include_directories(${PROJECT_SOURCE_DIR}/common/include
52 william 31 ${PROJECT_SOURCE_DIR}/common/include/Utilities
53     ${PROJECT_SOURCE_DIR}/common/include/x86emitter)
54    
55 william 401 # make the translation
56     if(EXISTS "${PROJECT_SOURCE_DIR}/locales")
57     add_subdirectory(locales)
58     endif(EXISTS "${PROJECT_SOURCE_DIR}/locales")
59    
60 william 31 # make 3rdParty
61 william 62 if(EXISTS "${PROJECT_SOURCE_DIR}/3rdparty")
62     add_subdirectory(3rdparty)
63     endif(EXISTS "${PROJECT_SOURCE_DIR}/3rdparty")
64 william 31
65     # make common
66 william 62 if(common_libs)
67     add_subdirectory(common/src/Utilities)
68     add_subdirectory(common/src/x86emitter)
69     endif(common_libs)
70 william 31
71     # make tools
72     add_subdirectory(tools)
73    
74     # make pcsx2
75 william 62 if(EXISTS "${PROJECT_SOURCE_DIR}/pcsx2" AND pcsx2_core)
76     add_subdirectory(pcsx2)
77     endif(EXISTS "${PROJECT_SOURCE_DIR}/pcsx2" AND pcsx2_core)
78 william 31
79     # make plugins
80 william 62 if(EXISTS "${PROJECT_SOURCE_DIR}/plugins")
81     add_subdirectory(plugins)
82     endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins")

  ViewVC Help
Powered by ViewVC 1.1.22