aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandre Bouvier <[email protected]>2021-08-14 19:20:37 +0200
committerAlexandre Bouvier <[email protected]>2021-08-14 19:20:37 +0200
commitc1e6569f13b05a21188c083c24338a4b7bb362fe (patch)
tree5c62ed47dc2d46e4fbf13941e42e0adb9992f968 /CMakeLists.txt
parent2fb843c3287918038c8f76276a590c25cc7ec5ee (diff)
downloadxbyak-c1e6569f13b05a21188c083c24338a4b7bb362fe.tar.gz
xbyak-c1e6569f13b05a21188c083c24338a4b7bb362fe.zip
fix cmake config files
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 15 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f2c54f1..9dfdda7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.6...3.0.2)
-project(xbyak CXX)
+project(xbyak LANGUAGES CXX VERSION 5.994)
file(GLOB headers xbyak/*.h)
@@ -18,17 +18,26 @@ if (DEFINED CMAKE_VERSION AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.2)
install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}-targets
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
)
- configure_file(
+ include(CMakePackageConfigHelpers)
+ configure_package_config_file(
cmake/config.cmake.in
- ${PROJECT_NAME}Config.cmake
- @ONLY
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ )
+ write_basic_package_version_file(
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake"
+ COMPATIBILITY SameMajorVersion
)
install(
- FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake"
+ DESTINATION
+ ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
)
install(