Commit 594d18c7 authored by Rashad Kanavath's avatar Rashad Kanavath

SuperBuild: comp: set library path if set and only on linux. (osx breaks build)

parent c28c2e91
......@@ -139,18 +139,23 @@ endif()
set(SB_CMAKE_ARGS "-G${CMAKE_GENERATOR}")
if(UNIX)
if(APPLE)
set(LDLIBVAR DYLD_LIBRARY_PATH)
set(SB_CMAKE_COMMAND env CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${CMAKE_COMMAND} ${SB_CMAKE_ARGS})
set(SB_ENV_CONFIGURE_CMD env CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER})
else()
set(LDLIBVAR LD_LIBRARY_PATH)
if( DEFINED ENV{LD_LIBRARY_PATH} )
set(LD_LIBRARY_PATH_VALUE ${SB_INSTALL_PREFIX}/lib:$ENV{LD_LIBRARY_PATH})
else()
set(LD_LIBRARY_PATH_VALUE ${SB_INSTALL_PREFIX}/lib)
endif()
set(SB_ENV_CONFIGURE_CMD env LD_LIBRARY_PATH=${LD_LIBRARY_PATH_VALUE} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER})
set(SB_CMAKE_COMMAND env LD_LIBRARY_PATH=${LD_LIBRARY_PATH_VALUE} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${CMAKE_COMMAND} ${SB_CMAKE_ARGS})
endif()
set(SB_ENV_CONFIGURE_CMD env ${LDLIBVAR}=${SB_INSTALL_PREFIX}/lib:$ENV{${LDLIBVAR}} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER})
set(SB_CMAKE_COMMAND env ${LDLIBVAR}=${CMAKE_INSTALL_PREFIX}/lib:$ENV{${LDLIBVAR}} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${CMAKE_COMMAND} ${SB_CMAKE_ARGS})
message(STATUS "Environment setup for Configure (SB_ENV_CONFIGURE_CMD): ${SB_ENV_CONFIGURE_CMD}")
message(STATUS "Environment setup for CMake (SB_CMAKE_COMMAND) : ${SB_CMAKE_COMMAND}")
else()
#windows
set(SB_CMAKE_COMMAND ${CMAKE_COMMAND} ${SB_CMAKE_ARGS})
endif()
message(STATUS "Environment setup for CMake (SB_CMAKE_COMMAND) : ${SB_CMAKE_COMMAND}")
set(FROM_SYSTEM_LIST)
set(FROM_SUPERBUILD_LIST)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment