Skip to content

Commit

Permalink
CMake update to keep DirectXMath headers in their own include directory
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed May 18, 2022
1 parent 07510d7 commit e95d848
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}>)
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}>)

#--- Package
include(CMakePackageConfigHelpers)
Expand Down Expand Up @@ -58,7 +58,7 @@ install(EXPORT ${PROJECT_NAME}-targets
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME}/cmake/)

install(FILES ${LIBRARY_HEADERS}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})

install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}-config.cmake
Expand Down

1 comment on commit e95d848

@walbourn
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ensures that you don't end up using DirectXMath through vcpkg toolchain if you didn't add it to your project explicitly. It also makes sure that the sal.h I use for non-Win32 platforms doesn't collide with any other sal.h used by other vcpkg ports.

Please sign in to comment.