forked from abodelot/sfml-widgets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
34 lines (29 loc) · 1.25 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(sfml-widgets)
###################################################################
# Option Setting
option(ENABLE_DEMO "build demo program.(Default:OFF)" OFF)
###################################################################
# 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 SFML_WIDGETS_SRC src/Gui/*.cpp src/Gui/**/*.cpp)
add_library(sfml-widgets ${SFML_WIDGETS_SRC} )
target_link_libraries(sfml-widgets PUBLIC sfml-graphics sfml-window sfml-system GL)
target_include_directories(sfml-widgets PUBLIC src/)
###################################################################
# Configure build for Sample program
if(ENABLE_DEMO)
file(GLOB DEMO_SRC demo/*.cpp)
add_executable(demo_program ${DEMO_SRC})
target_link_libraries(demo_program sfml-widgets)
endif()