From 2a0f43f7d6f640f5c72ad6100f4fe81aa7c9b2ea Mon Sep 17 00:00:00 2001 From: Simone Coco Date: Fri, 17 May 2024 12:07:04 +0200 Subject: [PATCH] Fix Windows compilation --- CMakeLists.txt | 1 + src/frontend/CMakeLists.txt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f6e1226..1f0ce39c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ if (HAS_SSE4_1) add_compile_options(-msse3 -msse4.1) endif () +add_compile_definitions(SDL_MAIN_HANDLED) if(${CMAKE_BUILD_TYPE} MATCHES Debug) add_compile_definitions(VULKAN_DEBUG) #add_compile_options(-fsanitize=address -fsanitize=undefined) diff --git a/src/frontend/CMakeLists.txt b/src/frontend/CMakeLists.txt index 1a4db0b6..7f71407b 100644 --- a/src/frontend/CMakeLists.txt +++ b/src/frontend/CMakeLists.txt @@ -4,9 +4,10 @@ project(kaizen-qt) set(CMAKE_CXX_STANDARD 17) find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) -find_package(SDL2 REQUIRED) +find_package(SDL2 CONFIG REQUIRED) include_directories( + ${SDL2_INCLUDE_DIRS} . ../ ../utils