Skip to content

Commit f8e8cf4

Browse files
authored
[CMake] Limit windows link options to MSVC (#60)
- enable building using ninja-clang on windows
1 parent 17de09d commit f8e8cf4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/desktop/CMakeLists.txt

+7-6
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME NovaSwarm)
88

99
if(WIN32)
1010
target_sources(${PROJECT_NAME} PRIVATE windows/app.rc)
11-
12-
set(subsystem $<IF:$<BOOL:$<CONFIG:Debug>>,CONSOLE,WINDOWS>)
13-
target_link_options(${PROJECT_NAME} PRIVATE
14-
/SUBSYSTEM:${subsystem}
15-
/ENTRY:mainCRTStartup
16-
)
11+
if(MSVC)
12+
set(subsystem $<IF:$<BOOL:$<CONFIG:Debug>>,CONSOLE,WINDOWS>)
13+
target_link_options(${PROJECT_NAME} PRIVATE
14+
/SUBSYSTEM:${subsystem}
15+
/ENTRY:mainCRTStartup
16+
)
17+
endif()
1718
endif()

0 commit comments

Comments
 (0)