equal
deleted
inserted
replaced
1 configure_file(${hedgewars_SOURCE_DIR}/hedgewars/proto.inc.in |
1 configure_file(${hedgewars_SOURCE_DIR}/hedgewars/proto.inc.in ${CMAKE_CURRENT_BINARY_DIR}/proto.inc) |
2 ${CMAKE_CURRENT_BINARY_DIR}/proto.inc) |
|
3 |
2 |
4 set(fpc_tryexe fpc) |
3 set(fpc_tryexe fpc) |
5 set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.dpr) |
4 set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwengine.dpr) |
6 |
5 |
7 set(engine_sources |
6 set(engine_sources |
63 if (${testnoexecstack}) |
62 if (${testnoexecstack}) |
64 set (noexecstack_flags "") |
63 set (noexecstack_flags "") |
65 endif (${testnoexecstack}) |
64 endif (${testnoexecstack}) |
66 |
65 |
67 IF(APPLE) |
66 IF(APPLE) |
68 |
|
69 FIND_PACKAGE(SDL) |
67 FIND_PACKAGE(SDL) |
70 |
68 |
71 if (SDL_FOUND) |
69 if (SDL_FOUND) |
72 set(CMAKE_C_FLAGS "-Wall -pipe") |
70 set(CMAKE_C_FLAGS "-Wall -pipe") |
73 set(CMAKE_C_FLAGS_RELEASE "-w -O2 -fomit-frame-pointer") |
71 set(CMAKE_C_FLAGS_RELEASE "-w -O2 -fomit-frame-pointer") |
80 add_library (SDLmain STATIC SDLMain.m) |
78 add_library (SDLmain STATIC SDLMain.m) |
81 set(engine_sources SDLmain ${engine_sources}) |
79 set(engine_sources SDLmain ${engine_sources}) |
82 else (SDL_FOUND) |
80 else (SDL_FOUND) |
83 message(FATAL_ERROR "No SDL framework found!") |
81 message(FATAL_ERROR "No SDL framework found!") |
84 endif (SDL_FOUND) |
82 endif (SDL_FOUND) |
85 |
|
86 ENDIF(APPLE) |
83 ENDIF(APPLE) |
87 |
84 |
88 string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" fpc_version "${fpc_output}") |
85 string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" fpc_version "${fpc_output}") |
89 if (fpc_version) |
86 if (fpc_version) |
90 string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" fpc_vers_major "${fpc_version}") |
87 string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" fpc_vers_major "${fpc_version}") |
110 #special handling of MSVC compiler (no static linking) |
107 #special handling of MSVC compiler (no static linking) |
111 if(MSVC) |
108 if(MSVC) |
112 set(pascal_compiler_flags "-dMSVC" ${pascal_compiler_flags}) |
109 set(pascal_compiler_flags "-dMSVC" ${pascal_compiler_flags}) |
113 endif(MSVC) |
110 endif(MSVC) |
114 |
111 |
115 IF(NOT APPLE OR NOT universal_build MATCHES "1") |
112 IF(NOT APPLE OR NOT universal_build) |
116 #here is the standard command for any system |
113 #here is the standard command for any system |
117 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine${CMAKE_EXECUTABLE_SUFFIX}" |
114 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hwengine${CMAKE_EXECUTABLE_SUFFIX}" |
118 COMMAND "${pascal_compiler}" |
115 COMMAND "${pascal_compiler}" |
119 ARGS ${pascal_compiler_flags} |
116 ARGS ${pascal_compiler_flags} |
120 MAIN_DEPENDENCY ${hwengine_project} |
117 MAIN_DEPENDENCY ${hwengine_project} |