diff CMakeLists.txt @ 525:ff8bee6459cd laaw

fix build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Jul 2013 16:47:41 +0200
parents 81cb140941a5
children eaca3d38b2aa
line wrap: on
line diff
--- a/CMakeLists.txt	Fri Jul 19 16:41:48 2013 +0200
+++ b/CMakeLists.txt	Fri Jul 19 16:47:41 2013 +0200
@@ -277,12 +277,14 @@
 
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
   if (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
-    set(ORTHANC_CPP_CLIENT_DEF ${ORTHANC_ROOT}/OrthancCppClient/Package/Build/Windows32.def)
+    set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/Build/Windows32.def)
   elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8)
-    set(ORTHANC_CPP_CLIENT_DEF ${ORTHANC_ROOT}/OrthancCppClient/Package/Build/Windows64.def)
+    set(ORTHANC_CPP_CLIENT_AUX ${ORTHANC_ROOT}/OrthancCppClient/Package/Build/Windows64.def)
   else()
     message(FATAL_ERROR "Support your platform here")
   endif()
+else()
+  set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES})
 endif()
 
 add_library(OrthancCppClient SHARED
@@ -303,9 +305,8 @@
   ${ORTHANC_ROOT}/Resources/sha1/sha1.cpp
   ${ORTHANC_ROOT}/Resources/md5/md5.c
   ${ORTHANC_ROOT}/Resources/base64/base64.cpp
-  ${ORTHANC_CPP_CLIENT_DEF}
+  ${ORTHANC_CPP_CLIENT_AUX}
   ${THIRD_PARTY_SOURCES}
-  ${OPENSSL_SOURCES}
   ${CURL_SOURCES}
   )
 
@@ -315,6 +316,8 @@
     )
   target_link_libraries(OrthancCppClient pthread)
 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+  target_link_libraries(OrthancCppClient OpenSSL)
+
   if (${CMAKE_COMPILER_IS_GNUCXX})
     set_target_properties(OrthancCppClient
       PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++"