Mercurial > hg > orthanc
comparison CMakeLists.txt @ 569:701d748cf327 laaw
fixes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 25 Sep 2013 13:18:19 +0200 |
parents | 3f27814104f7 |
children | 86c5bb651bfa |
comparison
equal
deleted
inserted
replaced
568:3f27814104f7 | 569:701d748cf327 |
---|---|
51 ##################################################################### | 51 ##################################################################### |
52 ## Inclusion of third-party dependencies | 52 ## Inclusion of third-party dependencies |
53 ##################################################################### | 53 ##################################################################### |
54 | 54 |
55 # Configuration of the standalone builds | 55 # Configuration of the standalone builds |
56 if (${CMAKE_CROSSCOMPILING}) | 56 if (CMAKE_CROSSCOMPILING) |
57 # Cross-compilation implies the standalone build | 57 # Cross-compilation implies the standalone build |
58 SET(STANDALONE_BUILD ON) | 58 SET(STANDALONE_BUILD ON) |
59 endif() | 59 endif() |
60 | 60 |
61 # Prepare the third-party dependencies | 61 # Prepare the third-party dependencies |
266 | 266 |
267 if (BUILD_CLIENT_LIBRARY) | 267 if (BUILD_CLIENT_LIBRARY) |
268 include_directories(${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw) | 268 include_directories(${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw) |
269 | 269 |
270 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 270 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
271 if (CMAKE_CROSS_COMPILING) | 271 if (CMAKE_CROSSCOMPILING) |
272 # Remove the default "lib" prefix from "libOrthancClient.dll" if cross-compiling | |
273 set(CMAKE_SHARED_LIBRARY_PREFIX "") | |
274 | |
272 if (${CMAKE_SIZEOF_VOID_P} EQUAL 4) | 275 if (${CMAKE_SIZEOF_VOID_P} EQUAL 4) |
273 set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/Windows32.def) | 276 set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/Windows32.def) |
274 elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8) | 277 elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8) |
275 set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/Windows64.def) | 278 set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/Windows64.def) |
276 else() | 279 else() |
309 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") | 312 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") |
310 set_target_properties(OrthancClient | 313 set_target_properties(OrthancClient |
311 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed -Wl,--version-script=${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw/VersionScript.map" | 314 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed -Wl,--version-script=${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw/VersionScript.map" |
312 ) | 315 ) |
313 target_link_libraries(OrthancClient pthread) | 316 target_link_libraries(OrthancClient pthread) |
317 | |
314 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 318 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
315 if (CMAKE_CROSS_COMPILING) | 319 if (CMAKE_CROSSCOMPILING) |
316 target_link_libraries(OrthancClient OpenSSL) | 320 target_link_libraries(OrthancClient OpenSSL ws2_32) |
317 set_target_properties(OrthancClient | 321 set_target_properties(OrthancClient |
318 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++" | 322 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++" |
319 ) | 323 ) |
320 target_link_libraries(OrthancClient ws2_32) | |
321 else() | 324 else() |
322 #message(FATAL_ERROR "Support Visual Studio here") | 325 message(FATAL_ERROR "Support Visual Studio here") |
323 endif() | 326 endif() |
327 | |
324 else() | 328 else() |
325 message(FATAL_ERROR "Support your platform here") | 329 message(FATAL_ERROR "Support your platform here") |
326 endif() | 330 endif() |
327 | 331 |
328 install( | 332 install( |