Skip to content

Commit

Permalink
Merge pull request #277 from Hoikas/dep_fixes
Browse files Browse the repository at this point in the history
Dependency cleanups for downstream consumers.
  • Loading branch information
zrax committed Oct 3, 2023
2 parents 29229fd + c07ecc5 commit 05a50b8
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
10 changes: 8 additions & 2 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,14 @@ add_library(HSPlasma
${SQUISH_SOURCES}
)
target_link_libraries(HSPlasma
JPEG::JPEG PNG::PNG string_theory Threads::Threads ZLIB::ZLIB
$<$<AND:$<BOOL:${ENABLE_PHYSX}>,$<BOOL:${PHYSX_FOUND}>>:${PHYSX_COOKING_LIBRARY}>
PUBLIC
string_theory
Threads::Threads
PRIVATE
JPEG::JPEG
PNG::PNG
ZLIB::ZLIB
$<$<AND:$<BOOL:${ENABLE_PHYSX}>,$<BOOL:${PHYSX_FOUND}>>:${PHYSX_COOKING_LIBRARY}>
)

target_include_directories(HSPlasma PUBLIC
Expand Down
9 changes: 6 additions & 3 deletions core/HSPlasmaConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
8 changes: 5 additions & 3 deletions net/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ add_library(HSPlasmaNet
${PN_SOURCES} ${PN_HEADERS}
)
target_link_libraries(HSPlasmaNet
HSPlasma string_theory
$<$<NOT:$<PLATFORM_ID:SunOS>>:OpenSSL::Crypto>
$<$<PLATFORM_ID:Windows>:ws2_32>
PUBLIC
HSPlasma
PRIVATE
$<$<NOT:$<PLATFORM_ID:SunOS>>:OpenSSL::Crypto>
$<$<PLATFORM_ID:Windows>:ws2_32>
)

target_include_directories(HSPlasmaNet PUBLIC
Expand Down
4 changes: 3 additions & 1 deletion net/HSPlasmaNetConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 05a50b8

Please sign in to comment.