aboutsummaryrefslogtreecommitdiff
path: root/cube
diff options
context:
space:
mode:
authorJuan Ramos <juan@lunarg.com>2023-10-05 13:16:05 -0600
committerJuan Ramos <114601453+juan-lunarg@users.noreply.github.com>2023-10-05 14:23:25 -0600
commit6807aa519f950375f08b18d319eb0dc5fd25e58c (patch)
tree55181172816b25bf12b213c6e4e510b1b77742ab /cube
parent0bd59f5c160a742d64b23df1244e41b43778c6b1 (diff)
downloadusermoji-6807aa519f950375f08b18d319eb0dc5fd25e58c.tar.xz
cmake: Use XCODE variable
Simplifies CMake code in various places for Apple builds
Diffstat (limited to 'cube')
-rw-r--r--cube/macOS/cube/cube.cmake6
-rw-r--r--cube/macOS/cubepp/cubepp.cmake6
2 files changed, 6 insertions, 6 deletions
diff --git a/cube/macOS/cube/cube.cmake b/cube/macOS/cube/cube.cmake
index ee98135d..15a56849 100644
--- a/cube/macOS/cube/cube.cmake
+++ b/cube/macOS/cube/cube.cmake
@@ -28,14 +28,14 @@ set(cube_RESOURCES ${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json
${CMAKE_CURRENT_SOURCE_DIR}/macOS/cube/Resources/VulkanIcon.icns)
# Have Xcode handle the Storyboard
-if(${CMAKE_GENERATOR} MATCHES "^Xcode.*")
+if(XCODE)
set(cube_RESOURCES ${cube_RESOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/macOS/cube/Resources/Main.storyboard)
endif()
add_executable(vkcube MACOSX_BUNDLE ${cube_SRCS} ${cube_HDRS} ${cube_RESOURCES} cube.vert.inc cube.frag.inc)
# Handle the Storyboard ourselves
-if(NOT ${CMAKE_GENERATOR} MATCHES "^Xcode.*")
+if(NOT XCODE)
# Compile the storyboard file with the ibtool.
add_custom_command(TARGET vkcube POST_BUILD
COMMAND ${IBTOOL}
@@ -70,7 +70,7 @@ set_source_files_properties("${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json"
"Resources/vulkan/icd.d")
# Copy the MoltenVK lib into the bundle.
-if(${CMAKE_GENERATOR} MATCHES "^Xcode.*")
+if(XCODE)
add_custom_command(TARGET vkcube POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${MOLTENVK_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib"
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/vkcube.app/Contents/Frameworks/libMoltenVK.dylib
diff --git a/cube/macOS/cubepp/cubepp.cmake b/cube/macOS/cubepp/cubepp.cmake
index 4ff82b6b..e6a3e485 100644
--- a/cube/macOS/cubepp/cubepp.cmake
+++ b/cube/macOS/cubepp/cubepp.cmake
@@ -30,14 +30,14 @@ set(cubepp_RESOURCES ${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json
${CMAKE_CURRENT_SOURCE_DIR}/macOS/cubepp/Resources/VulkanIcon.icns)
# Have Xcode handle the Storyboard
-if(${CMAKE_GENERATOR} MATCHES "^Xcode.*")
+if(XCODE)
set(cubepp_RESOURCES ${cubepp_RESOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/macOS/cubepp/Resources/Main.storyboard)
endif()
add_executable(vkcubepp MACOSX_BUNDLE ${cubepp_SRCS} ${cubepp_HDRS} ${cubepp_RESOURCES} cube.vert.inc cube.frag.inc)
# Handle the Storyboard ourselves
-if(NOT ${CMAKE_GENERATOR} MATCHES "^Xcode.*")
+if(NOT XCODE)
# Compile the storyboard file with the ibtool.
add_custom_command(TARGET vkcubepp POST_BUILD
COMMAND ${IBTOOL}
@@ -72,7 +72,7 @@ set_source_files_properties("${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json"
"Resources/vulkan/icd.d")
# Copy the MoltenVK lib into the bundle.
-if(${CMAKE_GENERATOR} MATCHES "^Xcode.*")
+if(XCODE)
add_custom_command(TARGET vkcubepp POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${MOLTENVK_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib"
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/vkcubepp.app/Contents/Frameworks/libMoltenVK.dylib