-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
23 lines (20 loc) · 956 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
project(cursesbird)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_VERBOSE_MAKEFILE 1)
find_package(Curses REQUIRED)
include_directories(includes ${CURSES_INCLUDE_DIR})
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake/;${CMAKE_MODULE_PATH}")
# Find SFML
# Note: SFML_STATIC_LIBRARIES determines which libraries are found by find_package()
find_package(SFML 2 COMPONENTS audio)
# If found, include and link; otherwise output error message
if(SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
else()
set(SFML_ROOT "" CACHE PATH "SFML top-level directory")
message("\n-> SFML directory not found. Set SFML_ROOT to SFML's top-level path (containing \"include\" and \"lib\" directories).")
message("-> Make sure the SFML libraries with the same configuration (Release/Debug, Static/Dynamic) exist.\n")
endif()
file(GLOB SOURCES "src/*.cpp")
add_executable(cursesbird ${SOURCES})
target_link_libraries(cursesbird ${CURSES_LIBRARIES} ${SFML_LIBRARIES})