mirror of
https://github.com/microsoft/DirectXMath
synced 2024-11-09 14:10:09 +00:00
CMake code review
This commit is contained in:
parent
967d9b692c
commit
c6d0cb3720
@ -1,7 +1,7 @@
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
cmake_minimum_required (VERSION 3.11)
|
||||
cmake_minimum_required (VERSION 3.14)
|
||||
|
||||
set(DIRECTXMATH_VERSION 3.1.7)
|
||||
|
||||
@ -30,7 +30,7 @@ add_library(${PROJECT_NAME} INTERFACE)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Inc>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}>)
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/directxmath>)
|
||||
|
||||
target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_11)
|
||||
|
||||
@ -42,7 +42,8 @@ string(TOLOWER ${PROJECT_NAME} PACKAGE_NAME)
|
||||
write_basic_package_version_file(
|
||||
${PACKAGE_NAME}-config-version.cmake
|
||||
VERSION ${DIRECTXMATH_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion)
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
ARCH_INDEPENDENT)
|
||||
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
EXPORT ${PROJECT_NAME}-targets
|
||||
@ -52,17 +53,17 @@ install(TARGETS ${PROJECT_NAME}
|
||||
|
||||
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/.nuget/${PROJECT_NAME}-config.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}-config.cmake
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/cmake/})
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME})
|
||||
|
||||
install(EXPORT ${PROJECT_NAME}-targets
|
||||
FILE ${PROJECT_NAME}-targets.cmake
|
||||
NAMESPACE Microsoft::
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/cmake/)
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME})
|
||||
|
||||
install(FILES ${LIBRARY_HEADERS}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/directxmath)
|
||||
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}-config.cmake
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}-config-version.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/cmake/)
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME})
|
||||
|
Loading…
Reference in New Issue
Block a user