Skip to content

Commit c21ef72

Browse files
authored
Merge pull request #2573 from gmittert/NotResourcefulEnough
Work around for CMake 3.15 Resource file linking
2 parents cfd7974 + a3db93e commit c21ef72

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Foundation/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ target_compile_options(Foundation PUBLIC
142142
"SHELL:-Xcc -F${CMAKE_BINARY_DIR}")
143143
target_compile_options(Foundation PRIVATE
144144
"SHELL:-Xcc -I${ICU_INCLUDE_DIR}")
145+
if(CMAKE_SYSTEM_NAME STREQUAL Windows AND CMAKE_VERSION VERSION_LESS 3.16)
146+
# Work around for CMake 15 which doesn't link in the resource file
147+
# target properly
148+
add_dependencies(Foundation CoreFoundationResources)
149+
target_link_options(Foundation PRIVATE $<TARGET_OBJECTS:CoreFoundationResources>)
150+
endif()
145151
if(ENABLE_TESTING)
146152
target_compile_options(Foundation PRIVATE
147153
-enable-testing)

0 commit comments

Comments
 (0)