summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f47ec87..42eccd4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,11 @@ project(bullethell)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_EXTENSIONS No)
-set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic")
+if (MSVC)
+ set(CMAKE_CXX_FLAGS "-D_USE_MATH_DEFINES -Wall")
+else()
+ set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic")
+endif()
set(CMAKE_CXX_RELEASE "-O3")
if(EMSCRIPTEN)
set(CMAKE_PREFIX_PATH "$ENV{HOME}/.emscripten_cache/sysroot;/usr/lib/emscripten/system")
@@ -31,3 +35,7 @@ add_executable(
WaveGenerator.cpp
)
target_link_libraries(${PROJECT_NAME} raylib)
+if(MSVC)
+ target_link_libraries(${PROJECT_NAME} winmm.lib)
+ target_link_options(${PROJECT_NAME} PRIVATE /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup)
+endif()