Mercurial > hg > orthanc
changeset 870:f4f5ab513157 jpeg
fix static builds
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 11 Jun 2014 09:13:22 +0200 |
parents | ea246626b96c |
children | 923e919324b1 |
files | CMakeLists.txt INSTALL Resources/CMake/GoogleLogConfiguration.cmake Resources/CMake/LuaConfiguration.cmake |
diffstat | 4 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Tue Jun 10 17:31:49 2014 +0200 +++ b/CMakeLists.txt Wed Jun 11 09:13:22 2014 +0200 @@ -309,7 +309,7 @@ OrthancServer/main.cpp ) -target_link_libraries(Orthanc ServerLibrary CoreLibrary) +target_link_libraries(Orthanc ServerLibrary CoreLibrary ${STATIC_LUA} ${STATIC_GOOGLE_LOG}) if (${OPENSSL_SOURCES_LENGTH} GREATER 0) target_link_libraries(Orthanc OpenSSL) @@ -338,7 +338,7 @@ ${GTEST_SOURCES} ${ORTHANC_UNIT_TESTS_SOURCES} ) -target_link_libraries(UnitTests ServerLibrary CoreLibrary) +target_link_libraries(UnitTests ServerLibrary CoreLibrary ${STATIC_LUA} ${STATIC_GOOGLE_LOG}) if (${OPENSSL_SOURCES_LENGTH} GREATER 0) target_link_libraries(UnitTests OpenSSL) @@ -390,6 +390,7 @@ ${ORTHANC_CPP_CLIENT_AUX} ${THIRD_PARTY_SOURCES} ${CURL_SOURCES} + ${GOOGLE_LOG_SOURCES} ) if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
--- a/INSTALL Tue Jun 10 17:31:49 2014 +0200 +++ b/INSTALL Wed Jun 11 09:13:22 2014 +0200 @@ -71,7 +71,7 @@ the following command: # cd ~/OrthancBuild -# cmake -DCMAKE_TOOLCHAIN_FILE=~/Orthanc/Resources/MinGWToolchain.cmake -DSTANDALONE_BUILD=ON -DCMAKE_BUILD_TYPE=Debug ~/Orthanc +# cmake -DCMAKE_TOOLCHAIN_FILE=~/Orthanc/Resources/MinGWToolchain.cmake -DSTATIC_BUILD=ON -DSTANDALONE_BUILD=ON -DCMAKE_BUILD_TYPE=Debug ~/Orthanc # make
--- a/Resources/CMake/GoogleLogConfiguration.cmake Tue Jun 10 17:31:49 2014 +0200 +++ b/Resources/CMake/GoogleLogConfiguration.cmake Wed Jun 11 09:13:22 2014 +0200 @@ -130,13 +130,10 @@ # This is a patch for MinGW64 add_definitions(-D_TIME_H__S=1) endif() - endif() - - add_library(GoogleLog STATIC ${GOOGLE_LOG_SOURCES}) - link_libraries(GoogleLog) + set(STATIC_GOOGLE_LOG GoogleLog) else() CHECK_INCLUDE_FILE_CXX(glog/logging.h HAVE_GOOGLE_LOG_H)
--- a/Resources/CMake/LuaConfiguration.cmake Tue Jun 10 17:31:49 2014 +0200 +++ b/Resources/CMake/LuaConfiguration.cmake Wed Jun 11 09:13:22 2014 +0200 @@ -51,7 +51,7 @@ ) add_library(Lua STATIC ${LUA_SOURCES}) - link_libraries(Lua) + set(STATIC_LUA Lua) source_group(ThirdParty\\Lua REGULAR_EXPRESSION ${LUA_SOURCES_DIR}/.*)