Enabled install when building with emscripten. (#906)

* Enabled install when building with emscripten.

* Also install the pkg-config files.
This commit is contained in:
Dirk Lemstra 2021-06-23 10:12:21 +02:00 committed by GitHub
parent 0a3944c8c9
commit ce222e317e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,19 +219,20 @@ add_executable(brotli ${BROTLI_CLI_C})
target_link_libraries(brotli ${BROTLI_LIBRARIES_STATIC})
# Installation
if(NOT BROTLI_EMSCRIPTEN)
if(NOT BROTLI_BUNDLED_MODE)
install(
TARGETS brotli
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
install(
TARGETS ${BROTLI_LIBRARIES_CORE}
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
if(NOT BROTLI_EMSCRIPTEN)
install(
TARGETS ${BROTLI_LIBRARIES_CORE}
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
endif() # BROTLI_EMSCRIPTEN
install(
TARGETS ${BROTLI_LIBRARIES_CORE_STATIC}
@ -245,7 +246,6 @@ if(NOT BROTLI_BUNDLED_MODE)
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
endif() # BROTLI_BUNDLED_MODE
endif() # BROTLI_EMSCRIPTEN
# Tests
@ -405,7 +405,6 @@ transform_pc_file("scripts/libbrotlidec.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libb
transform_pc_file("scripts/libbrotlienc.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlienc.pc" "${BROTLI_VERSION}")
if(NOT BROTLI_EMSCRIPTEN)
if(NOT BROTLI_BUNDLED_MODE)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libbrotlicommon.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
@ -414,7 +413,6 @@ if(NOT BROTLI_BUNDLED_MODE)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libbrotlienc.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif() # BROTLI_BUNDLED_MODE
endif() # BROTLI_EMSCRIPTEN
if (ENABLE_COVERAGE STREQUAL "yes")
SETUP_TARGET_FOR_COVERAGE(coverage test coverage)