diff options
| -rw-r--r-- | CMakeLists.txt | 17 | ||||
| -rw-r--r-- | include/CMakeLists.txt | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b897a53..9814356 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -324,6 +324,23 @@ if(NOT MSVC OR ENABLE_VSTEST) | |||
| 324 | add_subdirectory(tests) | 324 | add_subdirectory(tests) |
| 325 | endif() | 325 | endif() |
| 326 | 326 | ||
| 327 | if(NOT MSVC) | ||
| 328 | # Create pkgconfig files. | ||
| 329 | set(prefix ${CMAKE_INSTALL_PREFIX}) | ||
| 330 | set(exec_prefix \${prefix}) | ||
| 331 | set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR}) | ||
| 332 | set(includedir \${prefix}/include) | ||
| 333 | file(STRINGS "VERSION" VERSION LIMIT_COUNT 1) | ||
| 334 | file(GLOB OPENSSL_PKGCONFIGS "*.pc.in") | ||
| 335 | foreach(file ${OPENSSL_PKGCONFIGS}) | ||
| 336 | get_filename_component(filename ${file} NAME) | ||
| 337 | string(REPLACE ".in" "" new_file "${filename}") | ||
| 338 | configure_file(${filename} pkgconfig/${new_file} @ONLY) | ||
| 339 | endforeach() | ||
| 340 | install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig | ||
| 341 | DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
| 342 | endif() | ||
| 343 | |||
| 327 | configure_file( | 344 | configure_file( |
| 328 | "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" | 345 | "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" |
| 329 | "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" | 346 | "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" |
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index b730954..1d1a159 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt | |||
| @@ -3,5 +3,6 @@ if(ENABLE_LIBRESSL_INSTALL) | |||
| 3 | DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | 3 | DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} |
| 4 | PATTERN "CMakeLists.txt" EXCLUDE | 4 | PATTERN "CMakeLists.txt" EXCLUDE |
| 5 | PATTERN "compat" EXCLUDE | 5 | PATTERN "compat" EXCLUDE |
| 6 | PATTERN "pqueue.h" EXCLUDE | ||
| 6 | PATTERN "Makefile*" EXCLUDE) | 7 | PATTERN "Makefile*" EXCLUDE) |
| 7 | endif(ENABLE_LIBRESSL_INSTALL) | 8 | endif(ENABLE_LIBRESSL_INSTALL) |
