1
cmake_minimum_required(VERSION 2.4)
2
project(frescobaldi NONE)
5
option(HANDBOOK "Install Frescobaldi User Guide" ON)
6
option(BYTECOMPILE "Byte-compile Python modules on install" ON)
7
option(CHECKMODULES "Check presence and versions of required Python modules" ON)
10
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
18
# Check if all required Python modules are present by running checkmodules.py
20
python_test_script(${CMAKE_SOURCE_DIR}/checkmodules.py)
23
# Where to install stuff, in separate module
24
include(FindKDEInstallDirs)
26
# Do not rebuild our MO's and icons if the build rules were changed.
27
# Makes releasing prebuilt tarballs possible.
28
set(CMAKE_SKIP_RULE_DEPENDENCY TRUE)
30
# Set some install directories
31
set(APP_DIR ${DATA_INSTALL_DIR}/${PROJECT_NAME})
32
set(MODULE_DIR ${APP_DIR}/lib)
34
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/frescobaldi.py
35
${CMAKE_CURRENT_BINARY_DIR}/frescobaldi @ONLY)
36
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/frescobaldi DESTINATION ${BIN_INSTALL_DIR})
38
add_subdirectory(python)
39
add_subdirectory(data)
41
if(EXISTS ${CMAKE_SOURCE_DIR}/prebuilt)
42
add_subdirectory(prebuilt)
43
else(EXISTS ${CMAKE_SOURCE_DIR}/prebuilt)
44
add_subdirectory(pics)
46
endif(EXISTS ${CMAKE_SOURCE_DIR}/prebuilt)
56
DESTINATION ${APP_DIR}