1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2025-02-17 15:55:20 -05:00
polybar/CMakeLists.txt

52 lines
1.3 KiB
Text
Raw Normal View History

2016-05-19 16:41:06 +02:00
#
# Build configuration
#
2016-11-02 20:22:45 +01:00
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
2016-05-24 14:24:45 +02:00
# Enable ccache by default and as early as possible because project() performs
# checks on the compiler
option(ENABLE_CCACHE "Enable ccache support" ON)
if(ENABLE_CCACHE)
message(STATUS "Trying to enable ccache")
find_program(BIN_CCACHE ccache)
string(ASCII 27 esc)
if(NOT BIN_CCACHE)
message(STATUS "${esc}[33mCouldn't locate ccache, disabling ccache...${esc}[0m")
else()
# Enable only if the binary is found
message(STATUS "${esc}[32mUsing compiler cache ${BIN_CCACHE}${esc}[0m")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${BIN_CCACHE})
endif()
endif()
2016-11-19 06:22:44 +01:00
project(polybar C CXX)
2016-05-19 16:41:06 +02:00
2016-11-02 20:22:45 +01:00
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
${PROJECT_SOURCE_DIR}/cmake
2017-01-26 17:17:02 +01:00
${PROJECT_SOURCE_DIR}/cmake/common
2016-11-02 20:22:45 +01:00
${PROJECT_SOURCE_DIR}/cmake/modules)
2016-11-02 20:22:45 +01:00
include(utils)
2017-01-26 17:17:02 +01:00
include(01-core)
include(02-opts)
include(03-libs)
include(04-targets)
include(05-summary)
2016-06-15 05:32:35 +02:00
2017-01-26 17:17:02 +01:00
add_subdirectory(doc)
2017-05-19 12:30:26 +02:00
add_subdirectory(doc/bash)
2017-01-26 17:17:02 +01:00
add_subdirectory(doc/zsh)
add_subdirectory(include)
add_subdirectory(lib)
add_subdirectory(man)
add_subdirectory(src bin)
2016-10-25 01:46:26 +02:00
# We need to enable testing in the root folder so that 'ctest' and 'make test'
# can be run in the build directory
2016-10-12 07:17:03 +02:00
if(BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
2016-10-12 07:17:03 +02:00
endif()