Commit 932d4e3c authored by Samuel Debionne's avatar Samuel Debionne

Prefer the static version of libconfig++

That's one less folder to add in your %PATH%
parent 9a0e678f
......@@ -234,7 +234,7 @@ if(LIMA_ENABLE_CONFIG)
message(FATAL_ERROR "This compiler is not supported: " ${CMAKE_GENERATOR})
endif()
set(LIB_CONFIG_INCLUDE_DIR "C:/Program Files/LIBCONFIG-windows/${CONFIG_VERSION}/include" CACHE PATH "Path to LIBCONFIG++ includes")
set(LIB_CONFIG_DIR "C:/Program Files/LIBCONFIG-windows/${CONFIG_VERSION}/lib" CACHE PATH "Path to GSL lib folder")
set(LIB_CONFIG_DIR "C:/Program Files/LIBCONFIG-windows/${CONFIG_VERSION}/lib" CACHE PATH "Path to LIBCONFIG++ lib folder")
find_library(LIB_CONFIG libconfig++ ${LIB_CONFIG_DIR})
else()
find_library(LIB_CONFIG config++)
......@@ -250,6 +250,10 @@ if(LIMA_ENABLE_CONFIG)
set(control_srcs ${control_srcs} control/src/CtConfig.cpp)
link_directories(${LIB_CONFIG_DIR})
set(extra_includes ${extra_includes} ${LIB_CONFIG_INCLUDE_DIR})
if (WIN32)
target_link_libraries(limacore shlwapi.lib)
add_definitions(-DLIBCONFIGXX_STATIC)
endif()
else()
message(FATAL_ERROR "libconfig++ not found, set LIB_CONFIG path or disable LIMA_ENABLE_CONFIG")
endif()
......
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