Update dependencies

LT1AB
Ryan Burns 2020-02-27 08:38:50 -08:00
parent 96f2f368fe
commit de0ea75272
6 changed files with 28 additions and 15 deletions

View File

@ -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()

View File

@ -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)

View File

@ -9,6 +9,7 @@ Python_add_library(fitoff MODULE
target_include_directories(fitoff PUBLIC include)
target_link_libraries(fitoff PUBLIC
combinedLib
utilLib
)
InstallSameDir(

View File

@ -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(

View File

@ -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

View File

@ -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()