diff --git a/Endoomed/CMakeLists.txt b/Endoomed/CMakeLists.txt new file mode 100644 index 0000000..ac3c34b --- /dev/null +++ b/Endoomed/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION "3.15" FATAL_ERROR) +project(endoomed LANGUAGES CXX) + +find_package(SDL2 REQUIRED CONFIG) +find_package(SDL2_image REQUIRED CONFIG) + +add_executable(endoomed src/main.cpp) +set_property(TARGET endoomed PROPERTY CXX_STANDARD 11) +target_link_libraries(endoomed SDL2::SDL2 SDL2_image::SDL2_image) +if (TARGET SDL2::SDL_main) + target_link_libraries(endoomed SDL2::SDL_main) +endif() +if (CMAKE_C_PLATFORM_ID STREQUAL "Darwin" AND SDL2_FRAMEWORK_PATH MATCHES "^/Library/Frameworks") + set_property(TARGET endoomed PROPERTY BUILD_RPATH "/Library/Frameworks") +endif() diff --git a/Endoomed/src/main.cpp b/Endoomed/src/main.cpp index c844afb..36e90aa 100644 --- a/Endoomed/src/main.cpp +++ b/Endoomed/src/main.cpp @@ -1,5 +1,9 @@ #include -#include +#ifndef __APPLE__ +# include +#else +# include +#endif #include #include #include