summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake')
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake b/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake
new file mode 100644
index 0000000..58d2616
--- /dev/null
+++ b/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 3.23)
+
+project(XcodeXCConfig C)
+
+set(CMAKE_XCODE_XCCONFIG "$<IF:$<CONFIG:Debug>,XcodeXCConfig.global.debug.xcconfig,XcodeXCConfig.global.release.xcconfig>")
+
+add_library(somelib XcodeXCConfig.c)
+target_compile_definitions(somelib PUBLIC "BUILD_DEBUG=$<IF:$<CONFIG:Debug>,1,0>")
+set_target_properties(somelib PROPERTIES
+ XCODE_XCCONFIG "$<IF:$<CONFIG:Debug>,XcodeXCConfig.target.debug.xcconfig,XcodeXCConfig.target.release.xcconfig>"
+)