fix build under msys2
This commit is contained in:
parent
09d2bd715b
commit
c583573b0b
2 changed files with 10 additions and 2 deletions
|
@ -3,7 +3,9 @@ set(DP_WARN_FLAGS -Wall -Wextra -Wpedantic)
|
|||
# Source: log.c by rxi (https://github.com/rxi/log.c)
|
||||
add_library(logc log.c)
|
||||
target_compile_features(logc PRIVATE c_std_11)
|
||||
if (NOT WIN32)
|
||||
target_compile_definitions(logc PRIVATE -DLOG_USE_COLOR)
|
||||
endif()
|
||||
target_compile_options(logc INTERFACE -ffile-prefix-map=${CMAKE_SOURCE_DIR}=. PRIVATE ${DP_WARN_FLAGS})
|
||||
|
||||
find_package(Threads)
|
||||
|
@ -31,6 +33,12 @@ target_link_libraries(dp_imgui_demo
|
|||
PRIVATE imgui
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
find_package(SDL2)
|
||||
target_link_libraries(doompanning PRIVATE SDL2::SDL2main)
|
||||
target_link_libraries(dp_imgui_demo PRIVATE SDL2::SDL2main)
|
||||
endif()
|
||||
|
||||
add_executable(dp_common_c_test dp_common_c_test.c)
|
||||
target_compile_features(dp_common_c_test PRIVATE c_std_11)
|
||||
target_link_libraries(dp_common_c_test
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <imgui.h>
|
||||
#include <backends/imgui_impl_sdl.h>
|
||||
#include <backends/imgui_impl_sdlrenderer.h>
|
||||
#include <SDL.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <type_traits>
|
||||
|
|
Loading…
Reference in a new issue