comparison CMakeLists.txt @ 568:3f27814104f7 laaw

compile with msvc
author jodogne
date Wed, 25 Sep 2013 12:45:33 +0200
parents 6b9d09cc9e9d
children 701d748cf327
comparison
equal deleted inserted replaced
566:6a3e2ca7a7a0 568:3f27814104f7
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_SIZEOF_VOID_P} EQUAL 4) 271 if (CMAKE_CROSS_COMPILING)
272 set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/Windows32.def) 272 if (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
273 elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8) 273 set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/Windows32.def)
274 set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/Windows64.def) 274 elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8)
275 set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/Windows64.def)
276 else()
277 message(FATAL_ERROR "Support your platform here")
278 endif()
275 else() 279 else()
276 message(FATAL_ERROR "Support your platform here") 280 set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES})
277 endif() 281 endif()
278 else() 282 else()
279 set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES}) 283 set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES})
280 endif() 284 endif()
281 285
306 set_target_properties(OrthancClient 310 set_target_properties(OrthancClient
307 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed -Wl,--version-script=${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw/VersionScript.map" 311 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed -Wl,--version-script=${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw/VersionScript.map"
308 ) 312 )
309 target_link_libraries(OrthancClient pthread) 313 target_link_libraries(OrthancClient pthread)
310 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") 314 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
311 target_link_libraries(OrthancClient OpenSSL) 315 if (CMAKE_CROSS_COMPILING)
312 316 target_link_libraries(OrthancClient OpenSSL)
313 if (${CMAKE_COMPILER_IS_GNUCXX})
314 set_target_properties(OrthancClient 317 set_target_properties(OrthancClient
315 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++" 318 PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++"
316 ) 319 )
317 target_link_libraries(OrthancClient ws2_32) 320 target_link_libraries(OrthancClient ws2_32)
318 else() 321 else()
319 message(FATAL_ERROR "Support Visual Studio here") 322 #message(FATAL_ERROR "Support Visual Studio here")
320 endif() 323 endif()
321 else() 324 else()
322 message(FATAL_ERROR "Support your platform here") 325 message(FATAL_ERROR "Support your platform here")
323 endif() 326 endif()
324 327