2021-06-10 10:54:35 +03:00
|
|
|
set(UWAC_INCLUDE_DIR "include/uwac${UWAC_VERSION_MAJOR}")
|
|
|
|
|
2023-12-21 12:28:10 +03:00
|
|
|
if (NOT UWAC_FORCE_STATIC_BUILD)
|
|
|
|
# cmake package
|
|
|
|
export(PACKAGE uwac)
|
2021-06-10 10:54:35 +03:00
|
|
|
|
2023-12-21 12:28:10 +03:00
|
|
|
SetFreeRDPCMakeInstallDir(UWAC_CMAKE_INSTALL_DIR "uwac${UWAC_VERSION_MAJOR}")
|
2021-06-10 10:54:35 +03:00
|
|
|
|
2023-12-21 12:28:10 +03:00
|
|
|
configure_package_config_file(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/uwacConfig.cmake.in
|
2021-06-10 10:54:35 +03:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/uwacConfig.cmake
|
2023-12-21 12:28:10 +03:00
|
|
|
INSTALL_DESTINATION ${UWAC_CMAKE_INSTALL_DIR}
|
|
|
|
PATH_VARS UWAC_INCLUDE_DIR)
|
|
|
|
|
|
|
|
write_basic_package_version_file(
|
2021-06-10 10:54:35 +03:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/uwacConfigVersion.cmake
|
2023-12-21 12:28:10 +03:00
|
|
|
VERSION ${UWAC_VERSION}
|
|
|
|
COMPATIBILITY SameMajorVersion)
|
|
|
|
|
|
|
|
install(FILES
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/uwacConfig.cmake
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/uwacConfigVersion.cmake
|
|
|
|
DESTINATION ${UWAC_CMAKE_INSTALL_DIR})
|
2021-06-10 10:54:35 +03:00
|
|
|
|
2023-12-21 12:28:10 +03:00
|
|
|
install(EXPORT uwac DESTINATION ${UWAC_CMAKE_INSTALL_DIR})
|
|
|
|
endif()
|
2021-06-10 10:54:35 +03:00
|
|
|
|
|
|
|
set(UWAC_BUILD_CONFIG_LIST "")
|
|
|
|
GET_CMAKE_PROPERTY(res VARIABLES)
|
|
|
|
FOREACH(var ${res})
|
2024-10-23 15:20:26 +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()
|
2024-10-23 20:48:07 +03:00
|
|
|
|
2024-10-24 17:27:07 +03:00
|
|
|
include(CFlagsToVar)
|
|
|
|
CFlagsToVar(C_FLAGS)
|
2024-10-23 20:48:07 +03:00
|
|
|
|
2021-06-10 10:54:35 +03:00
|
|
|
string(REPLACE ";" " " UWAC_BUILD_CONFIG "${UWAC_BUILD_CONFIG_LIST}")
|
2024-10-02 23:37:35 +03:00
|
|
|
cleaning_configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/version.h)
|
|
|
|
cleaning_configure_file(buildflags.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/buildflags.h)
|
|
|
|
cleaning_configure_file(build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/build-config.h)
|
|
|
|
cleaning_configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/config.h)
|
2022-02-16 13:10:02 +03:00
|
|
|
|
2023-12-21 12:28:10 +03:00
|
|
|
if (NOT UWAC_FORCE_STATIC_BUILD)
|
|
|
|
include(pkg-config-install-prefix)
|
2024-10-02 23:37:35 +03:00
|
|
|
cleaning_configure_file(uwac.pc.in ${CMAKE_CURRENT_BINARY_DIR}/uwac${UWAC_VERSION_MAJOR}.pc @ONLY)
|
2022-02-16 13:10:02 +03:00
|
|
|
|
2023-12-21 12:28:10 +03:00
|
|
|
set(UWAC_INSTALL_INCLUDE_DIR ${UWAC_INCLUDE_DIR}/uwac)
|
2024-01-02 21:51:33 +03:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/uwac${UWAC_VERSION_MAJOR}.pc DESTINATION ${PKG_CONFIG_PC_INSTALL_DIR})
|
2023-12-21 12:28:10 +03:00
|
|
|
endif()
|