summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject/XcodeXCConfig.cmake
blob: 58d26164f63826addfa83559bcd0f76dbebe8242 (plain)
1
2
3
4
5
6
7
8
9
10
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>"
)