diff options
Diffstat (limited to 'lib/utfcpp/v4/CMakeLists.txt')
-rw-r--r-- | lib/utfcpp/v4/CMakeLists.txt | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/lib/utfcpp/v4/CMakeLists.txt b/lib/utfcpp/v4/CMakeLists.txt new file mode 100644 index 00000000..842c10ff --- /dev/null +++ b/lib/utfcpp/v4/CMakeLists.txt @@ -0,0 +1,52 @@ +# This file is deprecated and will be removed in a future release +# Please see the instructions for installation in README.md file + +cmake_minimum_required (VERSION 3.5...3.27) +project (utf8cpp + VERSION 4.0.4 + LANGUAGES CXX + DESCRIPTION "C++ portable library for working with utf-8 encoding") + +add_library(${PROJECT_NAME} INTERFACE) + +include(GNUInstallDirs) + +target_include_directories(utf8cpp INTERFACE + "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/source>" + $<INSTALL_INTERFACE:include/utf8cpp> +) + +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" + VERSION ${PROJECT_VERSION} + COMPATIBILITY SameMajorVersion +) + +install(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}Targets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + PUBLIC_HEADER DESTINATION include COMPONENT Development + BUNDLE DESTINATION bin COMPONENT Runtime +) + +configure_package_config_file( + "${PROJECT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in" + "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" + INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake +) + +install(EXPORT ${PROJECT_NAME}Targets + FILE ${PROJECT_NAME}Targets.cmake + NAMESPACE ${PROJECT_NAME}:: + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake) + +install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" + "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake) + +install(FILES ${PROJECT_SOURCE_DIR}/source/utf8.h DESTINATION include/utf8cpp) +install(DIRECTORY ${PROJECT_SOURCE_DIR}/source/utf8 DESTINATION + include/utf8cpp) |