Change dependency linking depending on SLIC3R_STATIC CMAKE option.

This commit is contained in:
Joseph Lenox 2018-07-14 20:21:34 -05:00
parent 4c3bddd6b8
commit db43d27be7

View File

@ -205,22 +205,35 @@ add_executable(slic3r slic3r.cpp)
#set_target_properties(slic3r PROPERTIES LINK_SEARCH_END_STATIC 1) #set_target_properties(slic3r PROPERTIES LINK_SEARCH_END_STATIC 1)
set(Boost_USE_STATIC_LIBS OFF) if(SLIC3R_STATIC)
set(Boost_USE_STATIC_RUNTIME OFF) set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
else(SLIC3R_STATIC)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_STATIC_RUNTIME OFF)
endif(SLIC3R_STATIC)
find_library(bsystem_l boost_system log) find_library(bsystem_l boost_system log)
add_library(bsystem SHARED IMPORTED) if(SLIC3R_STATIC)
add_library(bsystem STATIC IMPORTED)
else(SLIC3R_STATIC)
add_library(bsystem SHARED IMPORTED)
endif(SLIC3R_STATIC)
set_target_properties(bsystem PROPERTIES IMPORTED_LOCATION ${bsystem_l}) set_target_properties(bsystem PROPERTIES IMPORTED_LOCATION ${bsystem_l})
find_library(bthread_l boost_thread) find_library(bthread_l boost_thread)
if(SLIC3R_STATIC)
add_library(bthread STATIC IMPORTED)
else(SLIC3R_STATIC)
add_library(bthread SHARED IMPORTED) add_library(bthread SHARED IMPORTED)
endif(SLIC3R_STATIC)
set_target_properties(bthread PROPERTIES IMPORTED_LOCATION ${bthread_l}) set_target_properties(bthread PROPERTIES IMPORTED_LOCATION ${bthread_l})
include_directories(${Boost_INCLUDE_DIRS}) include_directories(${Boost_INCLUDE_DIRS})
if(${SLIC3R_STATIC}) if(SLIC3R_STATIC)
set(wxWidgets_USE_STATIC ON) set(wxWidgets_USE_STATIC ON)
else(${SLIC3R_STATIC}) else(SLIC3R_STATIC)
set(wxWidgets_USE_STATIC OFF) set(wxWidgets_USE_STATIC OFF)
endif(${SLIC3R_STATIC}) endif(SLIC3R_STATIC)
set(wxWidgets_USE_UNICODE ON) set(wxWidgets_USE_UNICODE ON)