Skip to content

Commit

Permalink
[CMake] Limit windows link options to MSVC
Browse files Browse the repository at this point in the history
- enable building using ninja-clang on windows
  • Loading branch information
NikolaJelic committed Jul 15, 2024
1 parent 95df896 commit a55fb27
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/desktop/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME NovaSwarm)

if(WIN32)
target_sources(${PROJECT_NAME} PRIVATE windows/app.rc)

set(subsystem $<IF:$<BOOL:$<CONFIG:Debug>>,CONSOLE,WINDOWS>)
target_link_options(${PROJECT_NAME} PRIVATE
/SUBSYSTEM:${subsystem}
/ENTRY:mainCRTStartup
)
if(MSVC)
set(subsystem $<IF:$<BOOL:$<CONFIG:Debug>>,CONSOLE,WINDOWS>)
target_link_options(${PROJECT_NAME} PRIVATE
/SUBSYSTEM:${subsystem}
/ENTRY:mainCRTStartup
)
endif()
endif()

0 comments on commit a55fb27

Please sign in to comment.