diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-01 20:31:43 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-12-01 21:36:19 +0100 |
commit | 687b9f8e812dc0eb942beea518da673a4c478956 (patch) | |
tree | 397b327709f49e5fd215bf221c4222dbe406a372 /editor/CMakeLists.txt | |
parent | 7c382ef301eb6ac3f55d98d2719cf4ba89d52aab (diff) |
editor: try to fix osx build failure
Diffstat (limited to 'editor/CMakeLists.txt')
-rw-r--r-- | editor/CMakeLists.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/editor/CMakeLists.txt b/editor/CMakeLists.txt index 38db2a04..f1455e32 100644 --- a/editor/CMakeLists.txt +++ b/editor/CMakeLists.txt @@ -10,7 +10,16 @@ else() endif() add_library(${self}_o STATIC "${sources}") -target_link_libraries(${self}_o PUBLIC MagnumIntegration::ImGui SDL2::SDL2 fmt::fmt nlohmann_json::nlohmann_json) +target_link_libraries(${self}_o PUBLIC MagnumIntegration::ImGui fmt::fmt nlohmann_json::nlohmann_json) + +if(NOT SDL2_INCLUDE_DIRS) + if(NOT TARGET SDL2::SDL2) + find_package(SDL2 QUIET REQUIRED) + else() + get_target_property(SDL2_INCLUDE_DIRS SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES) + endif() +endif() +target_include_directories(${self}_o SYSTEM PRIVATE "${SDL2_INCLUDE_DIRS}") add_executable(${self} "${res}") target_link_libraries(${self} PUBLIC ${self}_o floormat-main floormat-loader floormat-serialize) |