diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-05 08:17:00 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-05 08:17:00 +0100 |
commit | 2679d49a53a3f9825ce855f6ed25b3b045ec5aa1 (patch) | |
tree | 9767e933c25aa6a9a0b5b692890d655ea5029e24 /editor/CMakeLists.txt | |
parent | 38b4c1864fddb4ed552f2f4217395bd02e21c5fe (diff) |
editor, main: use less sdl includes
Diffstat (limited to 'editor/CMakeLists.txt')
-rw-r--r-- | editor/CMakeLists.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt index 2119ee9e..f94c21e1 100644 --- a/editor/CMakeLists.txt +++ b/editor/CMakeLists.txt @@ -12,6 +12,10 @@ endif() add_library(${self}_o OBJECT "${res}" "${sources}") target_link_libraries(${self}_o PUBLIC MagnumIntegration::ImGui fmt::fmt nlohmann_json::nlohmann_json) +if(WIN32) + target_sources(${self}_o PRIVATE "../main/floormat.rc") +endif() + if(NOT SDL2_INCLUDE_DIRS) if(NOT TARGET SDL2::SDL2) find_package(SDL2 QUIET REQUIRED) @@ -19,11 +23,10 @@ if(NOT SDL2_INCLUDE_DIRS) get_target_property(SDL2_INCLUDE_DIRS SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES) endif() endif() -target_include_directories(${self}_o SYSTEM PRIVATE "${SDL2_INCLUDE_DIRS}") - -if(WIN32) - target_sources(${self}_o PRIVATE "../main/floormat.rc") +if(FLOORMAT_PRECOMPILED-HEADERS) + include_directories("${SDL2_INCLUDE_DIRS}") endif() +set_property(SOURCE "events.cpp" APPEND PROPERTY INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}") add_executable(${self} dummy.cc) target_link_libraries(${self} PRIVATE ${self}_o floormat-main floormat-serialize floormat-draw floormat) |