forked from darktohka/libtoontown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
54 lines (44 loc) · 1.79 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
project(libdisney)
# Thanks to loblao's libpandadna for the base interrogate CMake project
### Panda3D dir ###
if(APPLE)
SET(PANDA_DIR "/Developer/Panda3D" CACHE STRING "Panda3D directory.")
endif()
if(WIN32)
SET(PANDA_DIR "C:/Panda3D-1.11.0-x64" CACHE STRING "Panda3D directory.")
SET(Python_ROOT_DIR "${PANDA_DIR}/python")
endif()
SET(BUILD_STATIC_LIB OFF CACHE BOOL "If true, will build a static lib")
SET(Python_USE_STATIC_LIBS ${BUILD_STATIC_LIB})
SET(Python_FIND_STRATEGY LOCATION)
find_package(Python COMPONENTS Interpreter Development)
if(NOT Python_Development_FOUND)
message(FATAL_ERROR "Python libs not found.")
endif()
if(NOT Python_Interpreter_FOUND)
message(FATAL_ERROR "Python interpreter not found.")
endif()
set(LIBPFX "")
if(MSVC)
set(LIBPFX "lib")
add_definitions(/wd4275)
add_definitions(/DYY_NO_UNISTD_H)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
execute_process(COMMAND "${CMAKE_C_COMPILER}" -dumpversion OUTPUT_VARIABLE GCC_VERSION)
message(STATUS "GCC Version: ${GCC_VERSION}")
if(GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
add_definitions(-std=c++11) # Enable the new C++ standard
else()
add_definitions(-std=c++0x) # Enable the new C++ standard
endif()
add_definitions(-Wno-ignored-attributes -Wno-deprecated-declarations -Wno-misleading-indentation)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
execute_process(COMMAND "${CMAKE_C_COMPILER}" -dumpversion OUTPUT_VARIABLE CLANG_VERSION)
message(STATUS "Clang Version: ${CLANG_VERSION}")
add_definitions(-std=c++11) # Enable the new C++ standard
add_definitions(-Wno-ignored-attributes -Wno-deprecated-declarations)
endif()
add_subdirectory(cmake/otp)
add_subdirectory(cmake/toontown)