diff --git a/cmake/Finddecomp2d.cmake b/cmake/Finddecomp2d.cmake index 7db9cbb9..28da61e0 100644 --- a/cmake/Finddecomp2d.cmake +++ b/cmake/Finddecomp2d.cmake @@ -1,6 +1,6 @@ # - Find the 2decomp-fft library find_package(decomp2d - PATHS ${CMAKE_SOURCE_DIR}/decomp2d/build) + PATHS ${CMAKE_SOURCE_DIR}/decomp2d/build ${decomp2d_INCLUDE_DIRS}) if (decomp2d_FOUND) message(STATUS "2decomp-fft FOUND") else(decomp2d_FOUND) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 27f93a02..fdad72bc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -78,7 +78,6 @@ if (${POISSON_SOLVER} STREQUAL "FFT" AND ${BACKEND} STREQUAL "OMP") message(STATUS "Using the FFT poisson solver with 2decomp&fft") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") find_package(decomp2d REQUIRED) - include_directories(${decomp2d_INCLUDE_DIRS}) target_link_libraries(decomp2d) target_link_libraries(x3d2 PRIVATE decomp2d) endif()