2021-06-10 10:54:35 +03:00
|
|
|
set(UWAC_INCLUDE_DIR "include/uwac${UWAC_VERSION_MAJOR}")
|
|
|
|
# cmake package
|
|
|
|
export(PACKAGE uwac)
|
|
|
|
|
|
|
|
SetFreeRDPCMakeInstallDir(UWAC_CMAKE_INSTALL_DIR "uwac${UWAC_VERSION_MAJOR}")
|
|
|
|
|
|
|
|
configure_package_config_file(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/uwacConfig.cmake.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/uwacConfig.cmake
|
|
|
|
INSTALL_DESTINATION ${UWAC_CMAKE_INSTALL_DIR}
|
|
|
|
PATH_VARS UWAC_INCLUDE_DIR)
|
|
|
|
|
|
|
|
write_basic_package_version_file(
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/uwacConfigVersion.cmake
|
|
|
|
VERSION ${UWAC_VERSION}
|
|
|
|
COMPATIBILITY SameMajorVersion)
|
|
|
|
|
2022-02-16 13:10:02 +03:00
|
|
|
install(FILES
|
2021-06-10 10:54:35 +03:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/uwacConfig.cmake
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/uwacConfigVersion.cmake
|
|
|
|
DESTINATION ${UWAC_CMAKE_INSTALL_DIR})
|
|
|
|
|
|
|
|
install(EXPORT uwac DESTINATION ${UWAC_CMAKE_INSTALL_DIR})
|
|
|
|
|
|
|
|
set(UWAC_BUILD_CONFIG_LIST "")
|
|
|
|
GET_CMAKE_PROPERTY(res VARIABLES)
|
|
|
|
FOREACH(var ${res})
|
2023-01-10 16:47:16 +03:00
|
|
|
IF (var MATCHES "^WITH_*|^BUILD_TESTING|^UWAC_HAVE_*")
|
2021-06-10 10:54:35 +03:00
|
|
|
LIST(APPEND UWAC_BUILD_CONFIG_LIST "${var}=${${var}}")
|
|
|
|
ENDIF()
|
|
|
|
ENDFOREACH()
|
|
|
|
string(REPLACE ";" " " UWAC_BUILD_CONFIG "${UWAC_BUILD_CONFIG_LIST}")
|
2022-02-16 13:10:02 +03:00
|
|
|
configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/version.h)
|
|
|
|
configure_file(buildflags.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/buildflags.h)
|
|
|
|
configure_file(build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/build-config.h)
|
|
|
|
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/config.h)
|
|
|
|
|
2023-10-09 11:00:58 +03:00
|
|
|
include(pkg-config-install-prefix)
|
2022-02-16 13:10:02 +03:00
|
|
|
configure_file(uwac.pc.in ${CMAKE_CURRENT_BINARY_DIR}/uwac${UWAC_VERSION_MAJOR}.pc @ONLY)
|
|
|
|
|
|
|
|
set(UWAC_INSTALL_INCLUDE_DIR ${UWAC_INCLUDE_DIR}/uwac)
|
2021-06-10 10:54:35 +03:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/uwac${UWAC_VERSION_MAJOR}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|