Mercurial > hg > orthanc
diff CMakeLists.txt @ 568:3f27814104f7 laaw
compile with msvc
author | jodogne |
---|---|
date | Wed, 25 Sep 2013 12:45:33 +0200 |
parents | 6b9d09cc9e9d |
children | 701d748cf327 |
line wrap: on
line diff
--- a/CMakeLists.txt Tue Sep 24 15:12:51 2013 +0200 +++ b/CMakeLists.txt Wed Sep 25 12:45:33 2013 +0200 @@ -268,12 +268,16 @@ include_directories(${ORTHANC_ROOT}/OrthancCppClient/Package/Laaw) if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") - if (${CMAKE_SIZEOF_VOID_P} EQUAL 4) - set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/Windows32.def) - elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8) - set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/Windows64.def) + if (CMAKE_CROSS_COMPILING) + if (${CMAKE_SIZEOF_VOID_P} EQUAL 4) + set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/Windows32.def) + elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8) + set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/AUTOGENERATED/Windows64.def) + else() + message(FATAL_ERROR "Support your platform here") + endif() else() - message(FATAL_ERROR "Support your platform here") + set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES}) endif() else() set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES}) @@ -308,15 +312,14 @@ ) target_link_libraries(OrthancClient pthread) elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") - target_link_libraries(OrthancClient OpenSSL) - - if (${CMAKE_COMPILER_IS_GNUCXX}) + if (CMAKE_CROSS_COMPILING) + target_link_libraries(OrthancClient OpenSSL) set_target_properties(OrthancClient PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++" ) target_link_libraries(OrthancClient ws2_32) else() - message(FATAL_ERROR "Support Visual Studio here") + #message(FATAL_ERROR "Support Visual Studio here") endif() else() message(FATAL_ERROR "Support your platform here")