summaryrefslogtreecommitdiff
path: root/lib/utfcpp/v4/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-12-07 16:43:46 +0100
committerAlexis Hildebrandt <afh@surryhill.net>2023-12-10 19:01:27 +0100
commitf017686dd4720bac373e8fcd5b779777a83162ec (patch)
tree408f1a27aa999bce0646f21c76330e3f252e1c76 /lib/utfcpp/v4/CMakeLists.txt
parent3cfad2570d7fe8aa5d88de3797797d695d4fbe06 (diff)
downloadfork-ledger-f017686dd4720bac373e8fcd5b779777a83162ec.tar.gz
fork-ledger-f017686dd4720bac373e8fcd5b779777a83162ec.tar.bz2
fork-ledger-f017686dd4720bac373e8fcd5b779777a83162ec.zip
utfcpp: Update to 4.0.4
Diffstat (limited to 'lib/utfcpp/v4/CMakeLists.txt')
-rw-r--r--lib/utfcpp/v4/CMakeLists.txt52
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)