diff options
author | Stephen Enders <smenders@gmail.com> | 2021-01-30 20:06:13 -0500 |
---|---|---|
committer | Stephen Enders <smenders@gmail.com> | 2021-01-30 20:06:13 -0500 |
commit | 8a091151afe20a39bdc41bf5837b75f19d7d357e (patch) | |
tree | 02c4d72a46091720cb886cbf08fe4ae9cb23d191 | |
parent | 2cf5daed84835d4f89f4db233a2f4060dfcfdabb (diff) |
Hide the terminal in windows execution
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bde961..3f3c88b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,13 +10,21 @@ endif() # setup SFML set(SFML_LIBRARIES sfml-system sfml-window sfml-graphics) +# prepend sfml-main for windows +if (WIN32) + set(SFML_LIBRARIES sfml-main ${SFML_LIBRARIES}) +endif() find_package(SFML 2.5 REQUIRED COMPONENTS system window graphics) - -add_executable(${EXECUTABLE_NAME} +set(SRC src/ur.cpp src/helper.cpp src/timedLatch.cpp src/random.cpp) +if(WIN32) + add_executable(${EXECUTABLE_NAME} WIN32 ${SRC}) +else() + add_executable(${EXECUTABLE_NAME} ${SRC}) +endif() target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES}) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/res DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) |