changeset 3625:d5cf43519a49

fix lsb
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 25 Jan 2020 10:40:20 +0100
parents b53cab5bad84
children 02a4eaa76a25
files CMakeLists.txt Resources/CMake/Compiler.cmake
diffstat 2 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Fri Jan 24 18:09:56 2020 +0100
+++ b/CMakeLists.txt	Sat Jan 25 10:40:20 2020 +0100
@@ -468,7 +468,7 @@
 if (ENABLE_PLUGINS AND BUILD_CONNECTIVITY_CHECKS)
   include(ExternalProject)
 
-  unset(Flags)
+  set(Flags)
   
   if (CMAKE_TOOLCHAIN_FILE)
     # Take absolute path to the toolchain
@@ -478,11 +478,13 @@
 
   if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
     list(APPEND Flags
-      -DLSB_CC=$ENV{LSB_CC}
-      -DLSB_CXX=$ENV{LSB_CXX}
+      -DLSB_CC=${CMAKE_LSB_CC}
+      -DLSB_CXX=${CMAKE_LSB_CXX}
       )
   endif()
 
+  message(${Flags})
+
   externalproject_add(ConnectivityChecksProject
     SOURCE_DIR "${ORTHANC_ROOT}/Plugins/Samples/ConnectivityChecks"
 
@@ -491,6 +493,7 @@
     -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}
     -DPLUGIN_VERSION=${ORTHANC_VERSION}
     -DSTATIC_BUILD=${STATIC_BUILD}
+    -DALLOW_DOWNLOADS=${ALLOW_DOWNLOADS}
     -DUSE_LEGACY_JSONCPP=${USE_LEGACY_JSONCPP}
     ${Flags}
     )
--- a/Resources/CMake/Compiler.cmake	Fri Jan 24 18:09:56 2020 +0100
+++ b/Resources/CMake/Compiler.cmake	Sat Jan 25 10:40:20 2020 +0100
@@ -7,6 +7,15 @@
   SET(STANDALONE_BUILD ON)
 endif()
 
+
+if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
+  # Cache the environment variables "LSB_CC" and "LSB_CXX" for further
+  # use by "ExternalProject" in CMake
+  SET(CMAKE_LSB_CC $ENV{LSB_CC} CACHE STRING "")
+  SET(CMAKE_LSB_CXX $ENV{LSB_CXX} CACHE STRING "")
+endif()
+
+
 if (CMAKE_COMPILER_IS_GNUCXX)
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-long-long")