Skip to content

Commit ce222e3

Browse files
authored
Enabled install when building with emscripten. (#906)
* Enabled install when building with emscripten. * Also install the pkg-config files.
1 parent 0a3944c commit ce222e3

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

CMakeLists.txt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,19 +219,20 @@ add_executable(brotli ${BROTLI_CLI_C})
219219
target_link_libraries(brotli ${BROTLI_LIBRARIES_STATIC})
220220

221221
# Installation
222-
if(NOT BROTLI_EMSCRIPTEN)
223222
if(NOT BROTLI_BUNDLED_MODE)
224223
install(
225224
TARGETS brotli
226225
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
227226
)
228227

229-
install(
230-
TARGETS ${BROTLI_LIBRARIES_CORE}
231-
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
232-
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
233-
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
234-
)
228+
if(NOT BROTLI_EMSCRIPTEN)
229+
install(
230+
TARGETS ${BROTLI_LIBRARIES_CORE}
231+
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
232+
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
233+
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
234+
)
235+
endif() # BROTLI_EMSCRIPTEN
235236

236237
install(
237238
TARGETS ${BROTLI_LIBRARIES_CORE_STATIC}
@@ -245,7 +246,6 @@ if(NOT BROTLI_BUNDLED_MODE)
245246
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
246247
)
247248
endif() # BROTLI_BUNDLED_MODE
248-
endif() # BROTLI_EMSCRIPTEN
249249

250250
# Tests
251251

@@ -405,7 +405,6 @@ transform_pc_file("scripts/libbrotlidec.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libb
405405

406406
transform_pc_file("scripts/libbrotlienc.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlienc.pc" "${BROTLI_VERSION}")
407407

408-
if(NOT BROTLI_EMSCRIPTEN)
409408
if(NOT BROTLI_BUNDLED_MODE)
410409
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libbrotlicommon.pc"
411410
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
@@ -414,7 +413,6 @@ if(NOT BROTLI_BUNDLED_MODE)
414413
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libbrotlienc.pc"
415414
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
416415
endif() # BROTLI_BUNDLED_MODE
417-
endif() # BROTLI_EMSCRIPTEN
418416

419417
if (ENABLE_COVERAGE STREQUAL "yes")
420418
SETUP_TARGET_FOR_COVERAGE(coverage test coverage)

0 commit comments

Comments
 (0)