3f9ce4bb99
This prevents the download of googletest for normal builds. Now when we want to compile and run tests we need to specify -DBUILD_TESTS=ON
35 lines
733 B
CMake
35 lines
733 B
CMake
#
|
|
# Build configuration
|
|
#
|
|
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
|
|
|
project(polybar C CXX)
|
|
|
|
set(CMAKE_MODULE_PATH
|
|
${CMAKE_MODULE_PATH}
|
|
${PROJECT_SOURCE_DIR}/cmake
|
|
${PROJECT_SOURCE_DIR}/cmake/common
|
|
${PROJECT_SOURCE_DIR}/cmake/modules)
|
|
|
|
include(utils)
|
|
include(01-core)
|
|
include(02-opts)
|
|
include(03-libs)
|
|
include(04-targets)
|
|
include(05-summary)
|
|
|
|
add_subdirectory(doc)
|
|
add_subdirectory(doc/bash)
|
|
add_subdirectory(doc/zsh)
|
|
add_subdirectory(include)
|
|
add_subdirectory(lib)
|
|
add_subdirectory(man)
|
|
add_subdirectory(src bin)
|
|
|
|
# We need to enable testing in the root folder so that 'ctest' and 'make test'
|
|
# can be run in the build directory
|
|
if(BUILD_TESTS)
|
|
enable_testing()
|
|
add_subdirectory(tests EXCLUDE_FROM_ALL)
|
|
endif()
|