changeset 570:86c5bb651bfa laaw

fix
author jodogne
date Wed, 25 Sep 2013 14:01:01 +0200
parents 701d748cf327
children ec2c2411d4db
files CMakeLists.txt Core/Toolbox.cpp
diffstat 2 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Wed Sep 25 13:18:19 2013 +0200
+++ b/CMakeLists.txt	Wed Sep 25 14:01:01 2013 +0200
@@ -280,8 +280,9 @@
         message(FATAL_ERROR "Support your platform here")
       endif()
     else()
-      set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES})
+      # Nothing to do if using Visual Studio
     endif()
+
   else()
     set(ORTHANC_CPP_CLIENT_AUX ${OPENSSL_SOURCES})
   endif()
@@ -316,13 +317,12 @@
     target_link_libraries(OrthancClient pthread)
 
   elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+    target_link_libraries(OrthancClient OpenSSL ws2_32)
+
     if (CMAKE_CROSSCOMPILING)
-      target_link_libraries(OrthancClient OpenSSL ws2_32)
       set_target_properties(OrthancClient
         PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--allow-multiple-definition -static-libgcc -static-libstdc++"
         )
-    else()
-      message(FATAL_ERROR "Support Visual Studio here")
     endif()
 
   else()
--- a/Core/Toolbox.cpp	Wed Sep 25 13:18:19 2013 +0200
+++ b/Core/Toolbox.cpp	Wed Sep 25 14:01:01 2013 +0200
@@ -68,16 +68,16 @@
 #include "../Resources/sha1/sha1.h"
 
 
-#ifdef _MSC_VER
-// Patch for the missing "_strtoll" symbol when compiling with Visual Studio
-extern "C"
-{
-int64_t _strtoi64(const char *nptr, char **endptr, int base);
-int64_t strtoll(const char *nptr, char **endptr, int base)
-{
-    return _strtoi64(nptr, endptr, base);
-} 
-}
+#ifdef _MSC_VER
+// Patch for the missing "_strtoll" symbol when compiling with Visual Studio
+extern "C"
+{
+int64_t _strtoi64(const char *nptr, char **endptr, int base);
+int64_t strtoll(const char *nptr, char **endptr, int base)
+{
+    return _strtoi64(nptr, endptr, base);
+} 
+}
 #endif