Skip to content

Commit 699abfc

Browse files
CMake: install xxhash and volk
1 parent ae151ac commit 699abfc

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

ThirdParty/CMakeLists.txt

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,6 @@ if (VULKAN_SUPPORTED OR METAL_SUPPORTED OR WEBGPU_SUPPORTED OR (ARCHIVER_SUPPORT
125125
install(FILES "${SPIRV-Cross_SOURCE_DIR}/LICENSE" DESTINATION "Licenses/ThirdParty/${DILIGENT_CORE_DIR}" RENAME SPIRV-Cross-License.txt)
126126
endif()
127127

128-
if (DILIGENT_INSTALL_CORE)
129-
install(TARGETS ${THIRD_PARTY_LIBS}
130-
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/${DILIGENT_CORE_DIR}/$<CONFIG>"
131-
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/${DILIGENT_CORE_DIR}/$<CONFIG>"
132-
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/${DILIGENT_CORE_DIR}/$<CONFIG>"
133-
)
134-
endif()
135-
136128
if (MSVC)
137129
foreach(TARGET ${THIRD_PARTY_LIBS})
138130
if (${DILIGENT_IMPROVE_SPIRV_TOOLS_DEBUG_PERF})
@@ -146,13 +138,6 @@ if (VULKAN_SUPPORTED OR METAL_SUPPORTED OR WEBGPU_SUPPORTED OR (ARCHIVER_SUPPORT
146138
endforeach()
147139
endif()
148140

149-
# Make sure that symbols do not leak out when third-party
150-
# libs are linked into shared libraries
151-
set_target_properties(${THIRD_PARTY_LIBS} PROPERTIES
152-
CXX_VISIBILITY_PRESET hidden # -fvisibility=hidden
153-
C_VISIBILITY_PRESET hidden # -fvisibility=hidden
154-
VISIBILITY_INLINES_HIDDEN TRUE
155-
)
156141
else()
157142
set(DILIGENT_USE_SPIRV_TOOLCHAIN FALSE CACHE INTERNAL "")
158143
endif()
@@ -169,6 +154,7 @@ if (VULKAN_SUPPORTED AND (PLATFORM_WIN32 OR PLATFORM_LINUX OR PLATFORM_MACOS OR
169154
set_common_target_properties(volk)
170155
set_directory_root_folder("volk" "DiligentCore/ThirdParty")
171156
install(FILES "${volk_SOURCE_DIR}/LICENSE.md" DESTINATION "Licenses/ThirdParty/${DILIGENT_CORE_DIR}" RENAME Volk-License.md)
157+
list(APPEND THIRD_PARTY_LIBS volk)
172158
endif()
173159

174160
if (WEBGPU_SUPPORTED)
@@ -210,6 +196,23 @@ if (NOT TARGET xxHash::xxhash)
210196
add_subdirectory(xxHash/build/cmake)
211197
set_directory_root_folder("xxHash/build/cmake" "DiligentCore/ThirdParty/xxHash")
212198
install(FILES "${xxHash_SOURCE_DIR}/../../LICENSE" DESTINATION "Licenses/ThirdParty/${DILIGENT_CORE_DIR}" RENAME xxHash-License.txt)
199+
list(APPEND THIRD_PARTY_LIBS xxhash)
200+
endif()
201+
202+
# Make sure that symbols do not leak out when third-party
203+
# libs are linked into shared libraries
204+
set_target_properties(${THIRD_PARTY_LIBS} PROPERTIES
205+
CXX_VISIBILITY_PRESET hidden # -fvisibility=hidden
206+
C_VISIBILITY_PRESET hidden # -fvisibility=hidden
207+
VISIBILITY_INLINES_HIDDEN TRUE
208+
)
209+
210+
if (DILIGENT_INSTALL_CORE)
211+
install(TARGETS ${THIRD_PARTY_LIBS}
212+
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/${DILIGENT_CORE_DIR}/$<CONFIG>"
213+
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/${DILIGENT_CORE_DIR}/$<CONFIG>"
214+
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/${DILIGENT_CORE_DIR}/$<CONFIG>"
215+
)
213216
endif()
214217

215218
install(FILES stb/stb_image_write_license.txt DESTINATION "Licenses/ThirdParty/${DILIGENT_CORE_DIR}")

0 commit comments

Comments
 (0)