comparison CMakeLists.txt @ 540:eaca3d38b2aa laaw

many fixes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 12 Sep 2013 12:55:07 +0200
parents ff8bee6459cd
children fe796b053863
comparison
equal deleted inserted replaced
537:2890721b0f57 540:eaca3d38b2aa
285 endif() 285 endif()
286 else() 286 else()
287 set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES}) 287 set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES})
288 endif() 288 endif()
289 289
290 add_library(OrthancCppClient SHARED 290 add_library(OrthancClient SHARED
291 ${ORTHANC_ROOT}/Core/OrthancException.cpp 291 ${ORTHANC_ROOT}/Core/OrthancException.cpp
292 ${ORTHANC_ROOT}/Core/Enumerations.cpp 292 ${ORTHANC_ROOT}/Core/Enumerations.cpp
293 ${ORTHANC_ROOT}/Core/Toolbox.cpp 293 ${ORTHANC_ROOT}/Core/Toolbox.cpp
294 ${ORTHANC_ROOT}/Core/HttpClient.cpp 294 ${ORTHANC_ROOT}/Core/HttpClient.cpp
295 ${ORTHANC_ROOT}/Core/MultiThreading/ArrayFilledByThreads.cpp 295 ${ORTHANC_ROOT}/Core/MultiThreading/ArrayFilledByThreads.cpp
309 ${THIRD_PARTY_SOURCES} 309 ${THIRD_PARTY_SOURCES}
310 ${CURL_SOURCES} 310 ${CURL_SOURCES}
311 ) 311 )
312 312
313 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") 313 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
314 set_target_properties(OrthancCppClient 314 set_target_properties(OrthancClient
315 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed -Wl,--version-script=${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw/VersionScript.map" 315 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed -Wl,--version-script=${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw/VersionScript.map"
316 ) 316 )
317 target_link_libraries(OrthancCppClient pthread) 317 target_link_libraries(OrthancClient pthread)
318 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") 318 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
319 target_link_libraries(OrthancCppClient OpenSSL) 319 target_link_libraries(OrthancClient OpenSSL)
320 320
321 if (${CMAKE_COMPILER_IS_GNUCXX}) 321 if (${CMAKE_COMPILER_IS_GNUCXX})
322 set_target_properties(OrthancCppClient 322 set_target_properties(OrthancClient
323 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++" 323 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++"
324 ) 324 )
325 target_link_libraries(OrthancCppClient ws2_32) 325 target_link_libraries(OrthancClient ws2_32)
326 else() 326 else()
327 message(FATAL_ERROR "Support Visual Studio here") 327 message(FATAL_ERROR "Support Visual Studio here")
328 endif() 328 endif()
329 else() 329 else()
330 message(FATAL_ERROR "Support your platform here") 330 message(FATAL_ERROR "Support your platform here")
331 endif() 331 endif()
332 332
333 # Copy the header file of the client library to the build directory
334 add_custom_command(
335 TARGET OrthancClient PRE_BUILD
336 COMMAND ${CMAKE_COMMAND} -E copy
337 ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/OrthancCppClient.h
338 ${CMAKE_BINARY_DIR})
333 339
334 340
335 ##################################################################### 341 #####################################################################
336 ## Generate the documentation if Doxygen is present 342 ## Generate the documentation if Doxygen is present
337 ##################################################################### 343 #####################################################################