equal
deleted
inserted
replaced
61 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/util/platform) |
61 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/util/platform) |
62 include_directories(${SDL_INCLUDE_DIR}) |
62 include_directories(${SDL_INCLUDE_DIR}) |
63 include_directories(${SDLMIXER_INCLUDE_DIR}) |
63 include_directories(${SDLMIXER_INCLUDE_DIR}) |
64 include_directories(BEFORE ${PHYSFS_INCLUDE_DIR}) |
64 include_directories(BEFORE ${PHYSFS_INCLUDE_DIR}) |
65 include_directories(BEFORE ${PHYSLAYER_INCLUDE_DIR}) |
65 include_directories(BEFORE ${PHYSLAYER_INCLUDE_DIR}) |
66 |
66 include_directories(${LUA_INCLUDE_DIR}) #brought by physlayer hwpacksmounter.h |
67 |
67 |
68 if(UNIX) |
68 if(UNIX) |
69 # HACK: in freebsd cannot find iconv.h included via SDL.h |
69 # HACK: in freebsd cannot find iconv.h included via SDL.h |
70 include_directories("/usr/local/include") |
70 include_directories("/usr/local/include") |
71 endif(UNIX) |
71 endif(UNIX) |
150 ${CMAKE_CURRENT_BINARY_DIR}/servermessages.h |
150 ${CMAKE_CURRENT_BINARY_DIR}/servermessages.h |
151 ) |
151 ) |
152 |
152 |
153 set(hwfr_rez hedgewars.qrc) |
153 set(hwfr_rez hedgewars.qrc) |
154 |
154 |
|
155 if(${BUILD_ENGINE_LIBRARY}) |
|
156 add_definitions(-DHWLIBRARY=1) |
|
157 set(hwlibname "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}") |
|
158 list(APPEND HW_LINK_LIBS ${hwlibname}) |
|
159 endif() |
155 |
160 |
156 qt4_add_resources(hwfr_rez_src ${hwfr_rez}) |
161 qt4_add_resources(hwfr_rez_src ${hwfr_rez}) |
157 |
162 |
158 qt4_wrap_cpp(hwfr_moc_srcs ${hwfr_moc_hdrs}) |
163 qt4_wrap_cpp(hwfr_moc_srcs ${hwfr_moc_hdrs}) |
159 |
164 |
180 #when debugging, always prompt a console to see fronted messages |
185 #when debugging, always prompt a console to see fronted messages |
181 #TODO: check it doesn't interfere on UNIX |
186 #TODO: check it doesn't interfere on UNIX |
182 if(CMAKE_BUILD_TYPE MATCHES "RELEASE") |
187 if(CMAKE_BUILD_TYPE MATCHES "RELEASE") |
183 set(console_access "WIN32") |
188 set(console_access "WIN32") |
184 endif(CMAKE_BUILD_TYPE MATCHES "RELEASE") |
189 endif(CMAKE_BUILD_TYPE MATCHES "RELEASE") |
185 if(${BUILD_ENGINE_LIBRARY}) |
|
186 add_definitions(-DHWLIBRARY=1) |
|
187 set(hwlibname "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}") |
|
188 list(APPEND HW_LINK_LIBS ${hwlibname}) |
|
189 endif() |
|
190 |
190 |
191 add_executable(hedgewars ${console_access} |
191 add_executable(hedgewars ${console_access} |
192 ${hwfr_src} |
192 ${hwfr_src} |
193 ${hwfr_moc_srcs} |
193 ${hwfr_moc_srcs} |
194 ${hwfr_hdrs} |
194 ${hwfr_hdrs} |
217 |
217 |
218 if(CMAKE_CXX_COMPILER MATCHES "clang*") |
218 if(CMAKE_CXX_COMPILER MATCHES "clang*") |
219 list(APPEND HW_LINK_LIBS stdc++) |
219 list(APPEND HW_LINK_LIBS stdc++) |
220 endif() |
220 endif() |
221 |
221 |
222 |
|
223 target_link_libraries(hedgewars ${HW_LINK_LIBS}) |
222 target_link_libraries(hedgewars ${HW_LINK_LIBS}) |
224 |
223 |
225 |
224 |
226 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_binary_install_dir}) |
225 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_binary_install_dir}) |
227 |
226 |