Tweaked CMakeLists.txt for better organization
authorRichard S. Wright Jr <richard@lunarg.com>
Tue, 26 Sep 2023 21:48:16 +0000 (17:48 -0400)
committerRichard S. Wright Jr <richard@lunarg.com>
Tue, 26 Sep 2023 22:02:44 +0000 (18:02 -0400)
CMakeLists.txt

index bab9f0f1c75cf5e34792d26ecb59efe26727b110..955f3d6066c7cfb9d8925762653ef2bb95b50b7c 100644 (file)
@@ -102,12 +102,6 @@ elseif(ANDROID)
     message(FATAL_ERROR "Android build not supported!")
 elseif(APPLE)
     target_compile_definitions(platform_wsi INTERFACE VK_USE_PLATFORM_MACOS_MVK VK_USE_PLATFORM_METAL_EXT)
-    
-# Build for iOS and tvOS
-    option(APPLE_EMBEDDED "Apple non desktop devices" OFF)
-    if (APPLE_EMBEDDED)
-        add_definitions(-D__APPLE_EMBEDDED__)
-    endif()
 elseif(UNIX AND NOT APPLE) # i.e.: Linux
     option(BUILD_WSI_XCB_SUPPORT "Build XCB WSI support" ON)
     option(BUILD_WSI_XLIB_SUPPORT "Build Xlib WSI support" ON)
@@ -157,6 +151,12 @@ set(LOADER_STANDARD_CXX_PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED YES CXX
 
 set(TESTS_STANDARD_CXX_PROPERTIES ${LOADER_STANDARD_CXX_PROPERTIES} MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
 
+# Build for iOS and tvOS
+option(APPLE_EMBEDDED "Apple non desktop devices" OFF)
+if (APPLE_EMBEDDED)
+    add_definitions(-D__APPLE_EMBEDDED__)
+endif()
+
 # Force the use of the multithreaded, static version of the C runtime.
 set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")