From 304bab2aced9cae51d2e4c09f3d9e06c66ff175d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 20 Mar 2022 13:03:18 -0400 Subject: we can build a window app! build type must be set to Release or it's horribly slow, and fullscreen does not work --- CMakeLists.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 58a7649..5fbf023 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,13 @@ set(CMAKE_BUILD_TYPE Debug) # Set directory to look for package helpers. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${Ether_SOURCE_DIR}/cmake") +IF(MSVC) + set(SDL2 "${Ether_SOURCE_DIR}/vendor/SDL2") + set(SDL2IMAGEDIR "${Ether_SOURCE_DIR}/vendor/SDL2_Image") + set(SDL2_TTF_PATH "${Ether_SOURCE_DIR}/vendor/SDL2_ttf") + set(APP_ICON_RESOURCE_WINDOWS "${Ether_SOURCE_DIR}/res/appicon.rc") +ENDIF(MSVC) + find_package(SDL2 REQUIRED) find_package(SDL2_Image REQUIRED) find_package(SDL2_TTF REQUIRED) @@ -41,8 +48,13 @@ add_executable(Ether src/menu.cpp src/runtime_test.cpp vendor/fov.c + ${APP_ICON_RESOURCE_WINDOWS} ) -set_property(TARGET Ether PROPERTY CXX_STANDARD 17) +set_property(TARGET Ether PROPERTY CXX_STANDARD 20) set_property(TARGET Ether PROPERTY CXX_STANDARD_REQUIRED ON) +IF(MSVC) + set_target_properties(Ether PROPERTIES WIN32_EXECUTABLE TRUE) +ENDIF(MSVC) + target_link_libraries(Ether ${ALL_LIBS}) -- cgit 1.4.1