From de0ea752725f95f293a7cead83115329124f3364 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Thu, 27 Feb 2020 08:38:50 -0800 Subject: [PATCH] Update dependencies --- .cmake/TargetX11.cmake | 28 ++++++++++++++---------- CMakeLists.txt | 2 +- components/mroipac/fitoff/CMakeLists.txt | 1 + contrib/alos2proc/CMakeLists.txt | 1 + contrib/mdx/CMakeLists.txt | 9 ++++++-- contrib/splitSpectrum/CMakeLists.txt | 2 +- 6 files changed, 28 insertions(+), 15 deletions(-) diff --git a/.cmake/TargetX11.cmake b/.cmake/TargetX11.cmake index 6d56334..f997883 100644 --- a/.cmake/TargetX11.cmake +++ b/.cmake/TargetX11.cmake @@ -1,21 +1,27 @@ -find_package(X11) +set(components + Xau + Xt + ) + +find_package(X11 COMPONENTS ${components}) if(X11_FOUND) + # make X11 look like a regular find_package component set(X11_X11_FOUND TRUE) + set(X11_X11_INCLUDE_PATH ${X11_INCLUDE_DIR}) + list(APPEND components X11) - foreach(component - X11 - Xmu - Xt - ) - - if(X11_${component}_FOUND AND NOT TARGET X11::${component}) - add_library(X11::${component} IMPORTED INTERFACE) - target_include_directories(X11::${component} SYSTEM - INTERFACE ${X11_${component}_INCLUDE_PATH}) + foreach(component ${components}) + message("${component} include = ${X11_${component}_INCLUDE_PATH}") + if(X11_${component}_FOUND) + if(NOT TARGET X11::${component}) + add_library(X11::${component} IMPORTED INTERFACE) + endif() target_link_libraries(X11::${component} INTERFACE ${X11_${component}_LIB}) + target_include_directories(X11::${component} SYSTEM + INTERFACE ${X11_${component}_INCLUDE_PATH}) endif() endforeach() endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index c271f86..3292dc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/.cmake) find_package(Python 3.5 REQUIRED COMPONENTS Interpreter Development) find_package(FFTW REQUIRED) find_package(Motif) -find_package(OpenMP) +find_package(OpenMP REQUIRED COMPONENTS C CXX Fortran) # Find these, and create IMPORTED INTERFACE libraries for them if they exist include(TargetGDAL) include(TargetMotif) diff --git a/components/mroipac/fitoff/CMakeLists.txt b/components/mroipac/fitoff/CMakeLists.txt index edc0fd8..64b3541 100644 --- a/components/mroipac/fitoff/CMakeLists.txt +++ b/components/mroipac/fitoff/CMakeLists.txt @@ -9,6 +9,7 @@ Python_add_library(fitoff MODULE target_include_directories(fitoff PUBLIC include) target_link_libraries(fitoff PUBLIC combinedLib + utilLib ) InstallSameDir( diff --git a/contrib/alos2proc/CMakeLists.txt b/contrib/alos2proc/CMakeLists.txt index a815450..16438dd 100644 --- a/contrib/alos2proc/CMakeLists.txt +++ b/contrib/alos2proc/CMakeLists.txt @@ -9,6 +9,7 @@ Python_add_library(libalos2proc MODULE target_include_directories(libalos2proc PUBLIC include) target_link_libraries(libalos2proc PUBLIC FFTW::Float + OpenMP::OpenMP_C ) InstallSameDir( diff --git a/contrib/mdx/CMakeLists.txt b/contrib/mdx/CMakeLists.txt index 84ae512..efacb3c 100644 --- a/contrib/mdx/CMakeLists.txt +++ b/contrib/mdx/CMakeLists.txt @@ -1,4 +1,8 @@ -if(TARGET Motif::Motif AND TARGET X11::Xt AND TARGET X11::X11) +if(TARGET Motif::Motif + AND TARGET X11::X11 + AND TARGET X11::Xau + AND TARGET X11::Xt + ) add_executable(mdx src/graphx_mdx.c src/rdf_reader_subs.f @@ -11,8 +15,9 @@ if(TARGET Motif::Motif AND TARGET X11::Xt AND TARGET X11::X11) endif() target_link_libraries(mdx PUBLIC Motif::Motif - X11::Xt X11::X11 + X11::Xau + X11::Xt ) install(TARGETS mdx RUNTIME DESTINATION bin diff --git a/contrib/splitSpectrum/CMakeLists.txt b/contrib/splitSpectrum/CMakeLists.txt index 1f68f77..fde6ae5 100644 --- a/contrib/splitSpectrum/CMakeLists.txt +++ b/contrib/splitSpectrum/CMakeLists.txt @@ -6,7 +6,7 @@ if(CYTHON_EXECUTABLE AND TARGET GDAL::GDAL) src/splitRangeSpectrum.cc ) target_include_directories(splitSpectrum PUBLIC include) - target_link_libraries(splitSpectrum PUBLIC GDAL::GDAL) + target_link_libraries(splitSpectrum PUBLIC GDAL::GDAL FFTW::Float OpenMP::OpenMP_CXX) InstallSameDir(splitSpectrum) endif()