diff options
author | Jeremy Hayes <jeremy@lunarg.com> | 2022-07-27 22:56:30 +0300 |
---|---|---|
committer | Jeremy Hayes <jeremy@lunarg.com> | 2022-07-27 22:56:30 +0300 |
commit | 539b239841bf049f82f4abf6baf5fabefef4e7fd (patch) | |
tree | 6dbe1281152bfc5f1bf742bd8646d4127620ab1b | |
parent | 0bcc624926a25a2a273d07877fd25a6ff5ba1cfb (diff) |
Remove custom target if skipping install
Fix #271.
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 147f7ad..9cfba73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,11 +44,6 @@ project(SPIRV-Headers VERSION 1.5.5) # 2. cmake .. # 3. cmake --build . --target install -# legacy -add_custom_target(install-headers - COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/include/spirv - $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/include/spirv) - option(SPIRV_HEADERS_SKIP_EXAMPLES "Skip building examples" ${SPIRV_HEADERS_SKIP_EXAMPLES}) @@ -61,6 +56,10 @@ endif() if(NOT ${SPIRV_HEADERS_SKIP_INSTALL}) set(SPIRV_HEADERS_ENABLE_INSTALL ON) + # legacy + add_custom_target(install-headers + COMMAND cmake -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/include/spirv + $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/include/spirv) endif() if (SPIRV_HEADERS_ENABLE_EXAMPLES) |