mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 04:19:07 +08:00
57 lines
2.0 KiB
Diff
57 lines
2.0 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index ac55f6b..e016967 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -166,12 +166,11 @@ endforeach()
|
|
|
|
foreach(lib brotlicommon brotlidec brotlienc brotlicommon-static brotlidec-static brotlienc-static)
|
|
target_link_libraries(${lib} ${LIBM_LIBRARY})
|
|
- set_property(TARGET ${lib} APPEND PROPERTY INCLUDE_DIRECTORIES ${BROTLI_INCLUDE_DIRS})
|
|
set_target_properties(${lib} PROPERTIES
|
|
VERSION "${BROTLI_ABI_COMPATIBILITY}.${BROTLI_ABI_AGE}.${BROTLI_ABI_REVISION}"
|
|
SOVERSION "${BROTLI_ABI_COMPATIBILITY}"
|
|
POSITION_INDEPENDENT_CODE TRUE)
|
|
- set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BROTLI_INCLUDE_DIRS}")
|
|
+ set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${BROTLI_INCLUDE_DIRS}>" $<INSTALL_INTERFACE:include>)
|
|
endforeach()
|
|
|
|
target_link_libraries(brotlidec brotlicommon)
|
|
@@ -199,27 +198,35 @@ target_link_libraries(brotli ${BROTLI_LIBRARIES_STATIC})
|
|
if(NOT BROTLI_BUNDLED_MODE)
|
|
install(
|
|
TARGETS brotli
|
|
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
+ RUNTIME DESTINATION tools/brotli
|
|
+ CONFIGURATIONS Release
|
|
)
|
|
|
|
+ if(BUILD_SHARED_LIBS)
|
|
install(
|
|
TARGETS ${BROTLI_LIBRARIES_CORE}
|
|
+ EXPORT brotli
|
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
)
|
|
-
|
|
+ else()
|
|
install(
|
|
TARGETS ${BROTLI_LIBRARIES_CORE_STATIC}
|
|
+ EXPORT brotli
|
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
)
|
|
+ endif()
|
|
|
|
install(
|
|
DIRECTORY ${BROTLI_INCLUDE_DIRS}/brotli
|
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
|
+ CONFIGURATIONS Release
|
|
)
|
|
+
|
|
+ install(EXPORT brotli FILE unofficial-brotli-config.cmake NAMESPACE unofficial::brotli:: DESTINATION share/unofficial-brotli)
|
|
endif()
|
|
|
|
# Tests
|