Some CMake Fixes.

pqueue.h was getting installed when it shouldn't.
pkgconfig files were not getting installed or generated.
This commit is contained in:
Aric Belsito 2017-09-08 13:43:38 -07:00
parent 8a2a079b6d
commit cbe57bef04
No known key found for this signature in database
GPG Key ID: AFA511A1D325651B
2 changed files with 18 additions and 0 deletions

View File

@ -324,6 +324,23 @@ if(NOT MSVC OR ENABLE_VSTEST)
add_subdirectory(tests)
endif()
if(NOT MSVC)
# Create pkgconfig files.
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix \${prefix})
set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
set(includedir \${prefix}/include)
file(STRINGS "VERSION" VERSION LIMIT_COUNT 1)
file(GLOB OPENSSL_PKGCONFIGS "*.pc.in")
foreach(file ${OPENSSL_PKGCONFIGS})
get_filename_component(filename ${file} NAME)
string(REPLACE ".in" "" new_file "${filename}")
configure_file(${filename} pkgconfig/${new_file} @ONLY)
endforeach()
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig
DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"

View File

@ -3,5 +3,6 @@ if(ENABLE_LIBRESSL_INSTALL)
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PATTERN "CMakeLists.txt" EXCLUDE
PATTERN "compat" EXCLUDE
PATTERN "pqueue.h" EXCLUDE
PATTERN "Makefile*" EXCLUDE)
endif(ENABLE_LIBRESSL_INSTALL)