diff options
| author | Tobias Heider <tobias.heider@stusta.de> | 2021-11-06 23:31:26 +0100 |
|---|---|---|
| committer | Tobias Heider <tobias.heider@stusta.de> | 2021-11-06 23:31:26 +0100 |
| commit | 2d853ecfc3f56954ed8f2dfb2065d90dfb84d95e (patch) | |
| tree | c9573ce0302baa0e42f8a27df620b0c512f3e821 | |
| parent | 0319bb7edb88f4eeb98f0a18072e0d7a3f62bb77 (diff) | |
| download | portable-2d853ecfc3f56954ed8f2dfb2065d90dfb84d95e.tar.gz portable-2d853ecfc3f56954ed8f2dfb2065d90dfb84d95e.tar.bz2 portable-2d853ecfc3f56954ed8f2dfb2065d90dfb84d95e.zip | |
Don't install pkgconfig if ENABLE_LIBRESSL_INSTALL is disabled.
| -rw-r--r-- | CMakeLists.txt | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f161653..84c2a56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -352,25 +352,27 @@ if(LIBRESSL_APPS AND LIBRESSL_TESTS) | |||
| 352 | add_subdirectory(tests) | 352 | add_subdirectory(tests) |
| 353 | endif() | 353 | endif() |
| 354 | 354 | ||
| 355 | if(NOT MSVC) | 355 | if(ENABLE_LIBRESSL_INSTALL) |
| 356 | # Create pkgconfig files. | 356 | if(NOT MSVC) |
| 357 | set(prefix ${CMAKE_INSTALL_PREFIX}) | 357 | # Create pkgconfig files. |
| 358 | set(exec_prefix \${prefix}) | 358 | set(prefix ${CMAKE_INSTALL_PREFIX}) |
| 359 | set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) | 359 | set(exec_prefix \${prefix}) |
| 360 | set(includedir \${prefix}/include) | 360 | set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) |
| 361 | if(PLATFORM_LIBS) | 361 | set(includedir \${prefix}/include) |
| 362 | string(REGEX REPLACE ";" " -l" PLATFORM_LDADD ";${PLATFORM_LIBS}") | 362 | if(PLATFORM_LIBS) |
| 363 | string(REGEX REPLACE ";" " -l" PLATFORM_LDADD ";${PLATFORM_LIBS}") | ||
| 364 | endif() | ||
| 365 | file(STRINGS "VERSION" VERSION LIMIT_COUNT 1) | ||
| 366 | file(GLOB OPENSSL_PKGCONFIGS "*.pc.in") | ||
| 367 | foreach(file ${OPENSSL_PKGCONFIGS}) | ||
| 368 | get_filename_component(filename ${file} NAME) | ||
| 369 | string(REPLACE ".in" "" new_file "${filename}") | ||
| 370 | configure_file(${filename} pkgconfig/${new_file} @ONLY) | ||
| 371 | endforeach() | ||
| 372 | install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig | ||
| 373 | DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
| 363 | endif() | 374 | endif() |
| 364 | file(STRINGS "VERSION" VERSION LIMIT_COUNT 1) | 375 | endif(ENABLE_LIBRESSL_INSTALL) |
| 365 | file(GLOB OPENSSL_PKGCONFIGS "*.pc.in") | ||
| 366 | foreach(file ${OPENSSL_PKGCONFIGS}) | ||
| 367 | get_filename_component(filename ${file} NAME) | ||
| 368 | string(REPLACE ".in" "" new_file "${filename}") | ||
| 369 | configure_file(${filename} pkgconfig/${new_file} @ONLY) | ||
| 370 | endforeach() | ||
| 371 | install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig | ||
| 372 | DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
| 373 | endif() | ||
| 374 | 376 | ||
| 375 | if(NOT "${OPENSSLDIR}" STREQUAL "") | 377 | if(NOT "${OPENSSLDIR}" STREQUAL "") |
| 376 | set(CONF_DIR "${OPENSSLDIR}") | 378 | set(CONF_DIR "${OPENSSLDIR}") |
