forked from albertlauncher/albert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (34 loc) · 1.49 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
cmake_minimum_required(VERSION 2.8.11)
PROJECT(albert)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# Set additional compiler flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic") #-Wconversion -Wunused
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -DQT_NO_DEBUG_OUTPUT ")
# Color make output
SET(CMAKE_COLOR_MAKEFILE ON)
# Suppress gcc details
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(CMAKE_VERBOSE_MAKEFILE ON)
else(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(CMAKE_VERBOSE_MAKEFILE OFF)
endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
# Put the binaries in dedicated toplevel directories
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Build project
add_subdirectory(src/application/)
add_subdirectory(src/lib/)
add_subdirectory(src/plugins/)
# Do platform specific post target stuff
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# Install desktop entry
install(FILES data/albert.desktop DESTINATION share/applications )
# Install icon
install(FILES src/application/resources/icons/albert.svg DESTINATION share/icons/hicolor/scalable/apps)
# Define where to install the themes
install(DIRECTORY data/themes DESTINATION share/${PROJECT_NAME} COMPONENT config)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")