Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSpaceIm <30052553+SpaceIm@users.noreply.github.com>2021-12-10 18:35:52 +0300
committerGitHub <noreply@github.com>2021-12-10 18:35:52 +0300
commitff07cfd86fa229525659f6b81058b3171a67bef1 (patch)
tree53ebdd888c67756ed688ffbffb493b9baa8c3a6e /tools
parente4527925944cbc8e91ef487c90c8e505e2065930 (diff)
CMake iOS fixes: rely on CMAKE_SYSTEM_NAME and handle bundle installation (#4619)
* detect iOS with CMAKE_SYSTEM_NAME IOS_PLATFORM is not a regular variable, it comes from unofficial iOS toolchain * fix installation of executables if BUNDLE enabled CMAKE_MACOSX_BUNDLE is enabled by default if CMAKE_SYSTEM_NAME is iOS, tvOS or watchOS. So installation of executables needs a BUNDLE DESTINATION otherwise configuration fails.
Diffstat (limited to 'tools')
-rw-r--r--tools/CMakeLists.txt9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 6039089a0..0a7e8651c 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -44,7 +44,7 @@ if (NOT ${SPIRV_SKIP_EXECUTABLES})
add_spvtools_tool(TARGET spirv-dis SRCS dis/dis.cpp LIBS ${SPIRV_TOOLS_FULL_VISIBILITY})
add_spvtools_tool(TARGET spirv-val SRCS val/val.cpp util/cli_consumer.cpp LIBS ${SPIRV_TOOLS_FULL_VISIBILITY})
add_spvtools_tool(TARGET spirv-opt SRCS opt/opt.cpp util/cli_consumer.cpp LIBS SPIRV-Tools-opt ${SPIRV_TOOLS_FULL_VISIBILITY})
- if (NOT DEFINED IOS_PLATFORM) # iOS does not allow std::system calls which spirv-reduce requires
+ if(NOT (${CMAKE_SYSTEM_NAME} STREQUAL "iOS")) # iOS does not allow std::system calls which spirv-reduce requires
add_spvtools_tool(TARGET spirv-reduce SRCS reduce/reduce.cpp util/cli_consumer.cpp LIBS SPIRV-Tools-reduce ${SPIRV_TOOLS_FULL_VISIBILITY})
endif()
add_spvtools_tool(TARGET spirv-link SRCS link/linker.cpp LIBS SPIRV-Tools-link ${SPIRV_TOOLS_FULL_VISIBILITY})
@@ -58,7 +58,7 @@ if (NOT ${SPIRV_SKIP_EXECUTABLES})
${SPIRV_HEADER_INCLUDE_DIR})
set(SPIRV_INSTALL_TARGETS spirv-as spirv-dis spirv-val spirv-opt
spirv-cfg spirv-link spirv-lint)
- if(NOT DEFINED IOS_PLATFORM)
+ if(NOT (${CMAKE_SYSTEM_NAME} STREQUAL "iOS"))
set(SPIRV_INSTALL_TARGETS ${SPIRV_INSTALL_TARGETS} spirv-reduce)
endif()
@@ -68,9 +68,6 @@ if (NOT ${SPIRV_SKIP_EXECUTABLES})
endif(SPIRV_BUILD_FUZZER)
if(ENABLE_SPIRV_TOOLS_INSTALL)
- install(TARGETS ${SPIRV_INSTALL_TARGETS}
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(TARGETS ${SPIRV_INSTALL_TARGETS} DESTINATION ${CMAKE_INSTALL_BINDIR})
endif(ENABLE_SPIRV_TOOLS_INSTALL)
endif()