-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
28 lines (19 loc) · 969 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
project(csol C)
cmake_minimum_required(VERSION 2.8.12)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_C_FLAGS "--std=c89 -Wall -pedantic -DUSE_GETOPT")
configure_file(csolrc csolrc COPYONLY)
file(COPY games DESTINATION .)
file(COPY themes DESTINATION .)
set(CURSES_NEED_WIDE TRUE)
find_package(Curses REQUIRED)
include_directories(${CURSES_INCLUDE_DIRS})
include_directories(${CMAKE_BINARY_DIR}/src src)
file(GLOB SRC_LIST src/*.c)
add_executable(csol ${SRC_LIST} csolrc)
target_link_libraries(csol ${CURSES_LIBRARIES})
install(TARGETS csol DESTINATION bin COMPONENT binaries)
install(FILES "${CMAKE_BINARY_DIR}/csolrc" DESTINATION /etc/xdg/csol COMPONENT config)
install(DIRECTORY "${CMAKE_BINARY_DIR}/themes" DESTINATION /etc/xdg/csol COMPONENT config)
install(DIRECTORY "${CMAKE_BINARY_DIR}/games" DESTINATION /etc/xdg/csol COMPONENT config)
install(FILES "${PROJECT_SOURCE_DIR}/doc/csol.6" DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man6)