diff --git a/Tools/CMakeLists.txt b/Tools/CMakeLists.txt index b9085206..71931e7f 100644 --- a/Tools/CMakeLists.txt +++ b/Tools/CMakeLists.txt @@ -7,7 +7,7 @@ endif() macro(plasma_tool NAME) add_executable(${NAME} src/${NAME}.cpp) - target_link_libraries(${NAME} HSPlasma ${STRING_THEORY_LIBRARIES}) + target_link_libraries(${NAME} PRIVATE HSPlasma) install(TARGETS ${NAME} RUNTIME DESTINATION bin) endmacro(plasma_tool) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 49d2c165..dfb481bb 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -802,8 +802,14 @@ add_library(HSPlasma ${SQUISH_SOURCES} ) target_link_libraries(HSPlasma - JPEG::JPEG PNG::PNG string_theory Threads::Threads ZLIB::ZLIB - $<$,$>:${PHYSX_COOKING_LIBRARY}> + PUBLIC + string_theory + Threads::Threads + PRIVATE + JPEG::JPEG + PNG::PNG + ZLIB::ZLIB + $<$,$>:${PHYSX_COOKING_LIBRARY}> ) target_include_directories(HSPlasma PUBLIC diff --git a/core/HSPlasmaConfig.cmake.in b/core/HSPlasmaConfig.cmake.in index f92483a4..e795b918 100644 --- a/core/HSPlasmaConfig.cmake.in +++ b/core/HSPlasmaConfig.cmake.in @@ -1,9 +1,12 @@ @PACKAGE_INIT@ include(CMakeFindDependencyMacro) -find_dependency(ZLIB) -find_dependency(JPEG) -find_dependency(PNG) +if(NOT "@BUILD_SHARED_LIBS@") + find_dependency(ZLIB) + find_dependency(JPEG) + find_dependency(PNG) +endif() +find_dependency(string_theory CONFIG) find_dependency(Threads) include(${CMAKE_CURRENT_LIST_DIR}/HSPlasma-targets.cmake) diff --git a/net/CMakeLists.txt b/net/CMakeLists.txt index 66639d50..a905470e 100644 --- a/net/CMakeLists.txt +++ b/net/CMakeLists.txt @@ -94,9 +94,11 @@ add_library(HSPlasmaNet ${PN_SOURCES} ${PN_HEADERS} ) target_link_libraries(HSPlasmaNet - HSPlasma string_theory - $<$>:OpenSSL::Crypto> - $<$:ws2_32> + PUBLIC + HSPlasma + PRIVATE + $<$>:OpenSSL::Crypto> + $<$:ws2_32> ) target_include_directories(HSPlasmaNet PUBLIC diff --git a/net/HSPlasmaNetConfig.cmake.in b/net/HSPlasmaNetConfig.cmake.in index fbb2c6d7..4ba511e1 100644 --- a/net/HSPlasmaNetConfig.cmake.in +++ b/net/HSPlasmaNetConfig.cmake.in @@ -2,7 +2,9 @@ include(CMakeFindDependencyMacro) find_dependency(HSPlasma CONFIG) -find_dependency(OpenSSL) +if(NOT "@BUILD_SHARED_LIBS@") + find_dependency(OpenSSL) +endif() include(${CMAKE_CURRENT_LIST_DIR}/HSPlasmaNet-targets.cmake)