CMake project
This commit is contained in:
15
Endoomed/CMakeLists.txt
Normal file
15
Endoomed/CMakeLists.txt
Normal file
@@ -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()
|
||||
@@ -1,5 +1,9 @@
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL2/SDL_image.h>
|
||||
#ifndef __APPLE__
|
||||
# include <SDL2/SDL_image.h>
|
||||
#else
|
||||
# include <SDL2_image/SDL_image.h>
|
||||
#endif
|
||||
#include <cstdio>
|
||||
#include <cmath>
|
||||
#include <memory.h>
|
||||
|
||||
Reference in New Issue
Block a user