|
1 | 1 | CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
2 | 2 |
|
3 |
| -PROJECT (load_image_to_array) |
| 3 | +PROJECT (insula) |
| 4 | + |
| 5 | +SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules) |
4 | 6 |
|
5 | 7 | SET (CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
6 | 8 |
|
7 | 9 | IF(${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
|
8 | 10 | message(FATAL_ERROR "In-source builds are not permitted. Make a separate folder for building:\nmkdir build; cd build; cmake ..\nBefore that, remove the files that cmake just created:\nrm -rf CMakeCache.txt CMakeFiles")
|
9 | 11 | ENDIF()
|
10 | 12 |
|
11 |
| -INCLUDE (FindPkgConfig) |
12 |
| - |
13 | 13 | OPTION(ENABLE_OPTIMIZATIONS "Enable -O3" ON)
|
14 | 14 |
|
15 | 15 | #SET (CMAKE_VERBOSE_MAKEFILE ON)
|
16 | 16 |
|
17 |
| -SET (Boost_ADDITIONAL_VERSIONS "1.44.0") |
| 17 | +SET (Boost_ADDITIONAL_VERSIONS "1.44.0" "1.44") |
18 | 18 |
|
19 | 19 | IF(MSVC)
|
20 | 20 | SET(Boost_USE_STATIC_LIBS ON)
|
21 | 21 | ENDIF()
|
22 | 22 |
|
23 | 23 | FIND_PACKAGE(
|
24 | 24 | Boost 1.44.0 REQUIRED COMPONENTS
|
25 |
| - iostreams |
26 | 25 | program_options
|
27 |
| - system |
28 |
| - thread |
29 | 26 | )
|
30 | 27 |
|
31 | 28 | INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIR})
|
| 29 | + |
32 | 30 | LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
|
33 |
| -PKG_CHECK_MODULES(SGE spacegameengine) |
34 |
| -LINK_DIRECTORIES(${SGE_LIBRARY_DIRS}) |
| 31 | + |
| 32 | +FIND_PACKAGE( |
| 33 | + Fcppt REQUIRED |
| 34 | +) |
| 35 | + |
| 36 | +INCLUDE_DIRECTORIES(${FCPPT_INCLUDE_DIRS}) |
| 37 | + |
| 38 | +LINK_DIRECTORIES(${FCPPT_LIBRARY_DIR}) |
| 39 | + |
| 40 | +FIND_PACKAGE( |
| 41 | + Mizuiro REQUIRED |
| 42 | +) |
| 43 | + |
| 44 | +INCLUDE_DIRECTORIES(${MIZUIRO_INCLUDE_DIRS}) |
| 45 | + |
| 46 | +FIND_PACKAGE( |
| 47 | + SGE REQUIRED |
| 48 | +) |
| 49 | + |
| 50 | +INCLUDE_DIRECTORIES(${SGE_INCLUDE_DIRS}) |
35 | 51 |
|
36 | 52 | IF (${CMAKE_COMPILER_IS_GNUCXX})
|
37 |
| - ADD_DEFINITIONS("-fvisibility=hidden -ansi -pedantic-errors -Wall" |
38 |
| - "-Wextra -Wconversion -Wfloat-equal -Wredundant-decls" |
39 |
| - "-Wstrict-null-sentinel -Winit-self -Woverloaded-virtual" |
40 |
| - "-Wold-style-cast -Wnon-virtual-dtor -Wctor-dtor-privacy -Wsign-promo" |
41 |
| - "-Wstrict-aliasing=1 -Wmissing-declarations -Wno-long-long" |
42 |
| - "-ggdb" |
43 |
| - "-std=c++0x") |
| 53 | + ADD_DEFINITIONS(" |
| 54 | + -fvisibility=hidden -std=c++0x -pedantic-errors -Wall" |
| 55 | + "-Wextra -Wconversion -Wfloat-equal -Wredundant-decls" |
| 56 | + "-Wstrict-null-sentinel -Winit-self -Woverloaded-virtual" |
| 57 | + "-Wold-style-cast -Wnon-virtual-dtor -Wctor-dtor-privacy -Wsign-promo" |
| 58 | + "-Wstrict-aliasing=1 -Wmissing-declarations" |
| 59 | + ) |
44 | 60 |
|
45 | 61 | IF (ENABLE_OPTIMIZATIONS)
|
46 | 62 | ADD_DEFINITIONS("-O3")
|
47 | 63 | ENDIF()
|
48 |
| - # we don't use long long but boost does :( |
49 | 64 |
|
50 |
| - ADD_DEFINITIONS(-D BOOST_FILESYSTEM_NO_DEPRECATED) |
51 | 65 | ADD_DEFINITIONS(-D BOOST_HAS_GCC_TR1)
|
52 | 66 | ELSEIF (MSVC)
|
53 |
| - ADD_DEFINITIONS ("/W3 /wd4512 /wd4355 /wd4800 /wd4996 /wd4714 /EHa /D_BIND_TO_CURRENT_VCLIBS_VERSION=1") |
| 67 | + ADD_DEFINITIONS ("/W4 /wd4996 /EHa /D_BIND_TO_CURRENT_VCLIBS_VERSION=1") |
54 | 68 | ENDIF ()
|
55 | 69 |
|
56 | 70 | ADD_DEFINITIONS(${SGE_CFLAGS})
|
@@ -90,7 +104,14 @@ ADD_LIBRARY(insula_library STATIC ${base_files} ${texture_files} ${console_files
|
90 | 104 |
|
91 | 105 | FUNCTION(CREATE_INSULA_EXE name)
|
92 | 106 | ADD_EXECUTABLE(${name} ${name}.cpp)
|
93 |
| - TARGET_LINK_LIBRARIES(${name} insula_library fcppt sgecore ${Boost_LIBRARIES} ${BULLET_LIBRARIES}) |
| 107 | + TARGET_LINK_LIBRARIES( |
| 108 | + ${name} |
| 109 | + insula_library |
| 110 | + ${FCPPT_LIBRARIES} |
| 111 | + ${SGE_CORE_LIBRARY} |
| 112 | + ${Boost_LIBRARIES} |
| 113 | + ${BULLET_LIBRARIES} |
| 114 | + ) |
94 | 115 | ENDFUNCTION(CREATE_INSULA_EXE)
|
95 | 116 |
|
96 | 117 | CREATE_INSULA_EXE(load_image_to_array)
|
|
0 commit comments