File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ endif()
3939add_subdirectory (third_party/random )
4040
4141include_directories (src third_party )
42- add_executable (${PROJECT_NAME} WIN32
42+
43+ set (SOURCES
4344 "src/metro.hpp"
4445 "src/metro.cpp"
4546 "src/main.cpp"
@@ -48,13 +49,22 @@ add_executable(${PROJECT_NAME} WIN32
4849 "resources.o"
4950)
5051
51- set_target_properties (${PROJECT_NAME} PROPERTIES
52- WIN32_EXECUTABLE TRUE
53- LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS"
54- )
52+ if (WIN32 )
53+ add_executable (${PROJECT_NAME} WIN32
54+ ${SOURCES}
55+ )
56+ else ()
57+ add_executable (${PROJECT_NAME}
58+ ${SOURCES}
59+ )
60+ endif ()
5561
5662if (WIN32 )
57- set_source_files_properties (resources.rc PROPERTIES HEADER_FILE_ONLY TRUE )
63+ set_target_properties (${PROJECT_NAME} PROPERTIES
64+ WIN32_EXECUTABLE TRUE
65+ LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS"
66+ )
67+ set_source_files_properties (resources.rc PROPERTIES HEADER_FILE_ONLY TRUE )
5868endif ()
5969
6070target_link_libraries (${PROJECT_NAME} raylib )
You can’t perform that action at this time.
0 commit comments