Skip to content

Commit

Permalink
Utility: fix another CMake error with Xcode "new build system".
Browse files Browse the repository at this point in the history
New build system and it's clearly worse than the old. Typical 2020s,
yes.
  • Loading branch information
mosra authored and sthalik committed Aug 29, 2023
1 parent 626054d commit 0120ca8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Corrade/Utility/Test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,13 @@ if(CORRADE_BUILD_STATIC AND NOT CORRADE_TARGET_EMSCRIPTEN AND NOT CORRADE_TARGET
add_library(UtilityGlobalStateAcrossLibrariesLibrary SHARED
GlobalStateAcrossLibrariesLibrary.cpp
${ResourceTestData})
if(CMAKE_GENERATOR STREQUAL Xcode)
# Xcode's "new build system" doesn't like when the same (generated)
# source file is used by two different targets (ResourceTestDataLib and
# UtilityGlobalStateAcrossLibrariesLibrary) that don't have any other
# dependency between them. WTF.
add_dependencies(UtilityGlobalStateAcrossLibrariesLibrary ResourceTestDataLib)
endif()
target_link_libraries(UtilityGlobalStateAcrossLibrariesLibrary PRIVATE CorradeUtility)

corrade_add_test(UtilityGlobalStateAcrossLibrariesTest
Expand Down

0 comments on commit 0120ca8

Please sign in to comment.