aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt38
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)
353endif() 353endif()
354 354
355if(NOT MSVC) 355if(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) 375endif(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})
373endif()
374 376
375if(NOT "${OPENSSLDIR}" STREQUAL "") 377if(NOT "${OPENSSLDIR}" STREQUAL "")
376 set(CONF_DIR "${OPENSSLDIR}") 378 set(CONF_DIR "${OPENSSLDIR}")