Skip to content

Commit

Permalink
Fix cmake build on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dpeter999 authored and TheCurle committed Apr 7, 2024
1 parent 05efdf3 commit 4702fb9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
11 changes: 3 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
cmake_minimum_required(VERSION 3.24)

set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_DEBUG_MODE 1)

#if (MSVC)
# add_compile_options(-Zc:externC /permissive- /Zc:__cplusplus /Zc:inline /Zc:preprocessor /Zc:lambda /Zc:templateScope)
#endif ()
if (GNU)
#add_compile_options(-fpermissive)
endif ()
include(FetchContent)

set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_DEBUG_MODE 0)

# Import some find files
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
Expand Down
2 changes: 1 addition & 1 deletion projs/shadow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ add_subdirectory(extern/spdlog)
add_subdirectory(extern/dylib)
add_subdirectory(extern/vulkan_memory_allocator)
add_subdirectory(extern/catch2)
add_subdirectory(extern/SDL2)
include(extern/SDL2/CMakeLists.txt)


# Core engine
Expand Down
4 changes: 2 additions & 2 deletions projs/shadow/extern/SDL2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ if (WIN32)
# Fetch SDL for the runtime
FetchContent_Declare(
SDL2
URL https://www.libsdl.org/release/SDL2-devel-2.26.0-VC.zip
URL https://www.libsdl.org/release/SDL2-devel-2.30.2-VC.zip
)
FetchContent_MakeAvailable(SDL2)
set(SDL2_DIR ${sdl2_SOURCE_DIR})
list(PREPEND CMAKE_PREFIX_PATH "${sdl2_SOURCE_DIR}/cmake")
list(APPEND CMAKE_PREFIX_PATH "${sdl2_SOURCE_DIR}/cmake")

endif ()
3 changes: 0 additions & 3 deletions projs/shadow/shadow-engine/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#find_package(Vulkan REQUIRED)
#find_package(DirectXMath REQUIRED)
find_package(SDL2 CONFIG REQUIRED)
#find_package(glm REQUIRED)
find_package(ImGui REQUIRED)

set(CMAKE_CXX_STANDARD 20)
Expand Down

0 comments on commit 4702fb9

Please sign in to comment.