Using CMake
This commit is contained in:
18
CMakeLists.txt
Normal file
18
CMakeLists.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
project(BeagleRescue)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
# Point to our own cmake modules
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/sdl2)
|
||||
|
||||
# Find SDL2
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(SDL2_image REQUIRED)
|
||||
find_package(SDL2_mixer REQUIRED)
|
||||
|
||||
# Add global definitions
|
||||
add_definitions("-Wall")
|
||||
include_directories(${SDL2_INCLUDE_DIR})
|
||||
|
||||
add_executable(BeagleRescue src/game/Main.cpp)
|
||||
install(TARGETS BeagleRescue DESTINATION bin)
|
||||
target_link_libraries(BeagleRescue ${SDL2_LIBRARIES} SDL2::Mixer SDL::Image)
|
||||
Reference in New Issue
Block a user