diff options
author | Karl Schultz <[email protected]> | 2018-05-30 16:43:14 -0600 |
---|---|---|
committer | Karl Schultz <[email protected]> | 2018-05-30 17:38:30 -0600 |
commit | afd12b7bdcd63bf4d8d669d6e06a368a0954b6e3 (patch) | |
tree | 35221eb40c4fb4e97e6980df634f3ab1e43bb4a1 /CMakeLists.txt | |
parent | a901a3edf256c1a1441433e77feac919fb8e5ed6 (diff) | |
download | Vulkan-Headers-afd12b7bdcd63bf4d8d669d6e06a368a0954b6e3.tar.gz Vulkan-Headers-afd12b7bdcd63bf4d8d669d6e06a368a0954b6e3.zip |
build: Add CMake files for install target
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..4cd8911 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 2.8.11) + +project(Vulkan-Headers NONE) + +include(GNUInstallDirs) +# Set a better default install location for Windows only if the user did not provide one. +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32) + set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "default install path" FORCE) +endif() + +install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(DIRECTORY "${CMAKE_SOURCE_DIR}/registry" DESTINATION ${CMAKE_INSTALL_DATADIR}/vulkan) + +# uninstall target +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) +add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) |