mirror of
https://github.com/glfw/glfw.git
synced 2026-02-17 21:12:34 +01:00
Added binary category variables for easier maintenance.
This commit is contained in:
@@ -23,15 +23,22 @@ else(APPLE)
|
||||
add_executable(wave WIN32 wave.c)
|
||||
endif(APPLE)
|
||||
|
||||
set(WINDOWS_BINARIES boing gears splitview triangle wave)
|
||||
set(CONSOLE_BINARIES listmodes)
|
||||
|
||||
if(MSVC)
|
||||
# Tell MSVC to use main instead of WinMain for Windows subsystem executables
|
||||
set_target_properties(boing gears splitview triangle wave PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup")
|
||||
set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES}
|
||||
PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup")
|
||||
endif(MSVC)
|
||||
|
||||
if(CYGWIN)
|
||||
# Set cross-compile and subsystem compile and link flags
|
||||
set_target_properties(boing gears listmodes splitview triangle wave PROPERTIES COMPILE_FLAGS "-mno-cygwin")
|
||||
set_target_properties(boing gears splitview triangle wave PROPERTIES LINK_FLAGS "-mno-cygwin -mwindows")
|
||||
set_target_properties(listmodes PROPERTIES LINK_FLAGS "-mno-cygwin -mconsole")
|
||||
set_target_properties(${WINDOWS_BINARIES} ${CONSOLE_BINARIES}
|
||||
PROPERTIES COMPILE_FLAGS "-mno-cygwin")
|
||||
set_target_properties(${WINDOWS_BINARIES}
|
||||
PROPERTIES LINK_FLAGS "-mno-cygwin -mwindows")
|
||||
set_target_properties(${CONSOLE_BINARIES}
|
||||
PROPERTIES LINK_FLAGS "-mno-cygwin -mconsole")
|
||||
endif(CYGWIN)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user