Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency cleanups for downstream consumers. #277

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading