-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
34 lines (29 loc) · 1.22 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
cmake_minimum_required(VERSION 3.0)
project(graphing)
###################################################################
# Option Setting
option(ENABLE_SAMPLE "build sample program.(Default:ON)" ON)
###################################################################
# import SFML library
find_package(SFML 2.5.1 COMPONENTS system window graphics)
if (SFML_FOUND)
message(STATUS "SFML_INCLUDE_DIRS: ${SFML_INCLUDE_DIR}")
message(STATUS "SFML_LIBRARIES: ${SFML_LIBRARIES}")
message(STATUS "SFML_VERSION: ${SFML_VERSION}")
endif ()
###################################################################
# Configure general build settings
set(CMAKE_CXX_STANDARD 17)
###################################################################
# Configure build for SFGraphing library
file(GLOB SFGRAPHING_SRC src/*.cpp)
add_library(SFGraphing ${SFGRAPHING_SRC} )
target_link_libraries(SFGraphing PUBLIC sfml-graphics sfml-window sfml-system)
target_include_directories(SFGraphing PUBLIC include/)
###################################################################
# Configure build for Sample program
if(ENABLE_SAMPLE)
file(GLOB SAMPLE_SRC sample/*.cpp)
add_executable(graphing ${SAMPLE_SRC})
target_link_libraries(graphing SFGraphing)
endif()