From 0b170434b41b473341e8896869a95381bc1c2fbb Mon Sep 17 00:00:00 2001 From: Vasile Vilvoiu Date: Thu, 22 Jul 2021 22:07:12 +0300 Subject: Skip GetNiceTicks test when no Xorg is started. --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d6810b1..ba7b6e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ find_library (FFTW3 fftw3) if (TESTING) find_package(GTest) + find_package(X11) endif() # Compiler setup @@ -31,7 +32,7 @@ add_compile_options (-Wall -Wextra -pedantic) set (SRC_DIR "${PROJECT_SOURCE_DIR}/src") set (MAN_DIR "${PROJECT_SOURCE_DIR}/man") -include_directories (${SOURCE_DIR}) +include_directories (${SOURCE_DIR} ${X11_INCLUDE_DIR}) # Get the latest abbreviated commit hash of the working branch # https://jonathanhamberg.com/post/cmake-embedding-git-hash/ @@ -107,6 +108,6 @@ if (TESTING) # Unit tests enable_testing () add_executable(unittest ${UNIT_TEST_SOURCES}) - target_link_libraries (unittest GTest::GTest ${PROJECT_NAME}_static Threads::Threads sfml-graphics ${FFTW3}) + target_link_libraries (unittest GTest::GTest ${PROJECT_NAME}_static Threads::Threads sfml-graphics ${FFTW3} ${X11_LIBRARIES}) gtest_discover_tests (unittest) endif() -- cgit v1.2.3