From eadb5003865b1ac3ff3a5eb36bd27b73826a0972 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 12 Aug 2017 12:07:51 +0200 Subject: [PATCH] Cmake: make Boost mandatory and suggest fftw3f if not installed. Fixes issue #46 --- CMakeLists.txt | 2 +- cmake/Modules/FindFFTW3F.cmake | 47 +++++++++++++++++++--------------- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 37d18989c..4fa51756c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,7 @@ find_package(Qt5Multimedia 5.0 REQUIRED) find_package(OpenGL REQUIRED) find_package(PkgConfig) -find_package(Boost) +find_package(Boost REQUIRED) find_package(FFTW3F) if (NOT BUILD_DEBIAN) diff --git a/cmake/Modules/FindFFTW3F.cmake b/cmake/Modules/FindFFTW3F.cmake index 2a99ee31b..504034173 100644 --- a/cmake/Modules/FindFFTW3F.cmake +++ b/cmake/Modules/FindFFTW3F.cmake @@ -7,34 +7,41 @@ INCLUDE(FindPkgConfig) PKG_CHECK_MODULES(PC_FFTW3F "fftw3f >= 3.0") FIND_PATH( - FFTW3F_INCLUDE_DIRS - NAMES fftw3.h - HINTS $ENV{FFTW3_DIR}/include - ${PC_FFTW3F_INCLUDE_DIR} - PATHS /usr/local/include - /usr/include + FFTW3F_INCLUDE_DIRS + NAMES fftw3.h + HINTS $ENV{FFTW3_DIR}/include + ${PC_FFTW3F_INCLUDE_DIR} + PATHS /usr/local/include + /usr/include ) FIND_LIBRARY( - FFTW3F_LIBRARIES - NAMES fftw3f libfftw3f - HINTS $ENV{FFTW3_DIR}/lib - ${PC_FFTW3F_LIBDIR} - PATHS /usr/local/lib - /usr/lib - /usr/lib64 + FFTW3F_LIBRARIES + NAMES fftw3f libfftw3f + HINTS $ENV{FFTW3_DIR}/lib + ${PC_FFTW3F_LIBDIR} + PATHS /usr/local/lib + /usr/lib + /usr/lib64 ) FIND_LIBRARY( - FFTW3F_THREADS_LIBRARIES - NAMES fftw3f_threads libfftw3f_threads - HINTS $ENV{FFTW3_DIR}/lib - ${PC_FFTW3F_LIBDIR} - PATHS /usr/local/lib - /usr/lib - /usr/lib64 + FFTW3F_THREADS_LIBRARIES + NAMES fftw3f_threads libfftw3f_threads + HINTS $ENV{FFTW3_DIR}/lib + ${PC_FFTW3F_LIBDIR} + PATHS /usr/local/lib + /usr/lib + /usr/lib64 ) INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFTW3F DEFAULT_MSG FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS) MARK_AS_ADVANCED(FFTW3F_LIBRARIES FFTW3F_INCLUDE_DIRS FFTW3F_THREADS_LIBRARIES) + +if(FFTW3F_LIBRARIES AND FFTW3F_INCLUDE_DIRS AND FFTW3F_THREADS_LIBRARIES) + message(STATUS "Found FFTW3F: ${FFTW3F_INCLUDE_DIRS}, ${FFTW3F_LIBRARIES}, ${FFTW3F_THREADS_LIBRARIES}") +else() + set(CM256CC_FOUND FALSE CACHE INTERNAL "CM256CC found") + message(STATUS "FFTW3F not found. You should consider installing fftw3f") +endif()