-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
47 lines (39 loc) · 1.46 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
35
36
37
38
39
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.9)
project(
oshu
VERSION 2.0.2
LANGUAGES CXX
)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(FindPkgConfig)
pkg_check_modules(SDL REQUIRED sdl2 SDL2_image)
pkg_check_modules(FFMPEG REQUIRED libavformat libavcodec libswresample libavutil)
pkg_check_modules(CAIRO REQUIRED cairo)
pkg_check_modules(PANGO REQUIRED pangocairo)
include(GNUInstallDirs)
# GNUInstallDirs creates one variable for the install() commands, and one for
# the final absolute path. We'll suffix the former with INSTALL_DIRECTORY.
set(OSHU_DATA_INSTALL_DIRECTORY "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}")
set(OSHU_SKINS_INSTALL_DIRECTORY "${OSHU_DATA_INSTALL_DIRECTORY}/skins")
set(OSHU_WEB_INSTALL_DIRECTORY "${OSHU_DATA_INSTALL_DIRECTORY}/web")
# Absolute paths for config.h:
set(OSHU_DATA_DIRECTORY "${CMAKE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}")
set(OSHU_SKINS_DIRECTORY "${OSHU_DATA_DIRECTORY}/skins")
set(OSHU_WEB_DIRECTORY "${OSHU_DATA_DIRECTORY}/web")
configure_file(config.h.in config.h)
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
include_directories(include)
add_subdirectory(lib)
add_subdirectory(src)
add_subdirectory(share)
enable_testing()
add_subdirectory(test)
find_package(Doxygen)
if (DOXYGEN_FOUND)
configure_file(Doxyfile.in Doxyfile)
add_custom_target(html
COMMAND "${DOXYGEN_EXECUTABLE}" "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile"
COMMENT "Generating the API documentation in ${CMAKE_BINARY_DIR}/html"
)
endif (DOXYGEN_FOUND)