-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (41 loc) · 949 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
cmake_minimum_required(VERSION 3.26)
project(SFMLButton)
set(SFML_INCLUDE_DIR "" CACHE PATH "Path to SFML include directory")
set(SFML_LIB_DIR "" CACHE PATH "Path to SFML lib directory")
include_directories(
${SFML_INCLUDE_DIR}
)
add_library(SFMLButton STATIC
src/Button.cpp
src/EllipseButton.cpp
src/RectButton.cpp
)
target_link_directories(SFMLButton PUBLIC
${SFML_LIB_DIR}
lib
)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
target_link_libraries(SFMLButton PUBLIC
sfml-audio-d
sfml-graphics-d
sfml-main-d
sfml-network-d
sfml-system-d
sfml-window-d
)
else()
target_link_libraries(SFMLButton PUBLIC
sfml-audio
sfml-graphics
sfml-main
sfml-network
sfml-system
sfml-window
ColorEscape
)
endif()
install(TARGETS SFMLButton
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)