From 6807aa519f950375f08b18d319eb0dc5fd25e58c Mon Sep 17 00:00:00 2001 From: Juan Ramos Date: Thu, 5 Oct 2023 13:16:05 -0600 Subject: cmake: Use XCODE variable Simplifies CMake code in various places for Apple builds --- cube/macOS/cubepp/cubepp.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cube/macOS/cubepp') 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}/$/vkcubepp.app/Contents/Frameworks/libMoltenVK.dylib -- cgit v1.2.3