diff --git a/recipe/meta.yaml b/recipe/meta.yaml index e3d74d66..77c738c5 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -26,7 +26,7 @@ requirements: - vc 14 # [win and py36] - vc 14 # [win and py35] - vc 9 # [win and py27] - - cmake + - cmake ==3.12 run: - {{ pin_compatible('numpy', max_pin='x.x') }} diff --git a/src/Core/CMakeLists.txt b/src/Core/CMakeLists.txt index b3c0dfbe..8251af8e 100644 --- a/src/Core/CMakeLists.txt +++ b/src/Core/CMakeLists.txt @@ -81,28 +81,22 @@ add_library(cilreg SHARED ) target_link_libraries(cilreg ${EXTRA_LIBRARIES} ) include_directories(cilreg PUBLIC - ${LIBRARY_INC}/include - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/regularisers_CPU/ - ${CMAKE_CURRENT_SOURCE_DIR}/inpainters_CPU/ ) + ${LIBRARY_INC}/include + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/include/cpu/ + ) ## Install - -if (UNIX) -message ("I'd install into ${CMAKE_INSTALL_PREFIX}/lib") +include(GNUInstallDirs) install(TARGETS cilreg - LIBRARY DESTINATION lib - CONFIGURATIONS ${CMAKE_BUILD_TYPE} - ) -elseif(WIN32) -message ("I'd install into ${CMAKE_INSTALL_PREFIX} lib bin") - install(TARGETS cilreg RUNTIME DESTINATION bin - ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib CONFIGURATIONS ${CMAKE_BUILD_TYPE} ) -endif() +install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) # GPU Regularisers @@ -122,20 +116,25 @@ if (BUILD_CUDA) ${CMAKE_CURRENT_SOURCE_DIR}/regularisers_GPU/Diffus_4thO_GPU_core.cu ${CMAKE_CURRENT_SOURCE_DIR}/regularisers_GPU/PatchSelect_GPU_core.cu ) - if (UNIX) - message ("I'd install into ${CMAKE_INSTALL_PREFIX}/lib") - install(TARGETS cilregcuda - LIBRARY DESTINATION lib - CONFIGURATIONS ${CMAKE_BUILD_TYPE} - ) - elseif(WIN32) - message ("I'd install into ${CMAKE_INSTALL_PREFIX} lib bin") - install(TARGETS cilregcuda + include_directories(cilregcuda PUBLIC + ${LIBRARY_INC}/include + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/include/gpu/ + ) + + install(TARGETS cilregcuda + #RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + #LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + #ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION bin + LIBRARY DESTINATION lib ARCHIVE DESTINATION lib CONFIGURATIONS ${CMAKE_BUILD_TYPE} ) - endif() + + install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + else() message("CUDA NOT FOUND") endif() diff --git a/src/Core/CCPiDefines.h b/src/Core/include/CCPiDefines.h similarity index 100% rename from src/Core/CCPiDefines.h rename to src/Core/include/CCPiDefines.h diff --git a/src/Core/inpainters_CPU/Diffusion_Inpaint_core.h b/src/Core/include/Diffusion_Inpaint_core.h similarity index 100% rename from src/Core/inpainters_CPU/Diffusion_Inpaint_core.h rename to src/Core/include/Diffusion_Inpaint_core.h diff --git a/src/Core/inpainters_CPU/NonlocalMarching_Inpaint_core.h b/src/Core/include/NonlocalMarching_Inpaint_core.h similarity index 100% rename from src/Core/inpainters_CPU/NonlocalMarching_Inpaint_core.h rename to src/Core/include/NonlocalMarching_Inpaint_core.h diff --git a/src/Core/regularisers_CPU/Diffus4th_order_core.h b/src/Core/include/cpu/Diffus4th_order_core.h similarity index 100% rename from src/Core/regularisers_CPU/Diffus4th_order_core.h rename to src/Core/include/cpu/Diffus4th_order_core.h diff --git a/src/Core/regularisers_CPU/Diffusion_core.h b/src/Core/include/cpu/Diffusion_core.h similarity index 100% rename from src/Core/regularisers_CPU/Diffusion_core.h rename to src/Core/include/cpu/Diffusion_core.h diff --git a/src/Core/regularisers_CPU/FGP_TV_core.h b/src/Core/include/cpu/FGP_TV_core.h similarity index 100% rename from src/Core/regularisers_CPU/FGP_TV_core.h rename to src/Core/include/cpu/FGP_TV_core.h diff --git a/src/Core/regularisers_CPU/FGP_dTV_core.h b/src/Core/include/cpu/FGP_dTV_core.h similarity index 100% rename from src/Core/regularisers_CPU/FGP_dTV_core.h rename to src/Core/include/cpu/FGP_dTV_core.h diff --git a/src/Core/regularisers_CPU/LLT_ROF_core.h b/src/Core/include/cpu/LLT_ROF_core.h similarity index 100% rename from src/Core/regularisers_CPU/LLT_ROF_core.h rename to src/Core/include/cpu/LLT_ROF_core.h diff --git a/src/Core/regularisers_CPU/Nonlocal_TV_core.h b/src/Core/include/cpu/Nonlocal_TV_core.h similarity index 100% rename from src/Core/regularisers_CPU/Nonlocal_TV_core.h rename to src/Core/include/cpu/Nonlocal_TV_core.h diff --git a/src/Core/regularisers_CPU/PatchSelect_core.h b/src/Core/include/cpu/PatchSelect_core.h similarity index 100% rename from src/Core/regularisers_CPU/PatchSelect_core.h rename to src/Core/include/cpu/PatchSelect_core.h diff --git a/src/Core/regularisers_CPU/ROF_TV_core.h b/src/Core/include/cpu/ROF_TV_core.h similarity index 100% rename from src/Core/regularisers_CPU/ROF_TV_core.h rename to src/Core/include/cpu/ROF_TV_core.h diff --git a/src/Core/regularisers_CPU/SB_TV_core.h b/src/Core/include/cpu/SB_TV_core.h similarity index 100% rename from src/Core/regularisers_CPU/SB_TV_core.h rename to src/Core/include/cpu/SB_TV_core.h diff --git a/src/Core/regularisers_CPU/TGV_core.h b/src/Core/include/cpu/TGV_core.h similarity index 100% rename from src/Core/regularisers_CPU/TGV_core.h rename to src/Core/include/cpu/TGV_core.h diff --git a/src/Core/regularisers_CPU/TNV_core.h b/src/Core/include/cpu/TNV_core.h similarity index 100% rename from src/Core/regularisers_CPU/TNV_core.h rename to src/Core/include/cpu/TNV_core.h diff --git a/src/Core/regularisers_CPU/utils.h b/src/Core/include/cpu/utils.h similarity index 100% rename from src/Core/regularisers_CPU/utils.h rename to src/Core/include/cpu/utils.h diff --git a/src/Core/regularisers_GPU/Diffus_4thO_GPU_core.h b/src/Core/include/gpu/Diffus_4thO_GPU_core.h similarity index 100% rename from src/Core/regularisers_GPU/Diffus_4thO_GPU_core.h rename to src/Core/include/gpu/Diffus_4thO_GPU_core.h diff --git a/src/Core/regularisers_GPU/LLT_ROF_GPU_core.h b/src/Core/include/gpu/LLT_ROF_GPU_core.h similarity index 100% rename from src/Core/regularisers_GPU/LLT_ROF_GPU_core.h rename to src/Core/include/gpu/LLT_ROF_GPU_core.h diff --git a/src/Core/regularisers_GPU/NonlDiff_GPU_core.h b/src/Core/include/gpu/NonlDiff_GPU_core.h similarity index 100% rename from src/Core/regularisers_GPU/NonlDiff_GPU_core.h rename to src/Core/include/gpu/NonlDiff_GPU_core.h diff --git a/src/Core/regularisers_GPU/PatchSelect_GPU_core.h b/src/Core/include/gpu/PatchSelect_GPU_core.h similarity index 100% rename from src/Core/regularisers_GPU/PatchSelect_GPU_core.h rename to src/Core/include/gpu/PatchSelect_GPU_core.h diff --git a/src/Core/regularisers_GPU/TGV_GPU_core.h b/src/Core/include/gpu/TGV_GPU_core.h similarity index 100% rename from src/Core/regularisers_GPU/TGV_GPU_core.h rename to src/Core/include/gpu/TGV_GPU_core.h diff --git a/src/Core/regularisers_GPU/TV_FGP_GPU_core.h b/src/Core/include/gpu/TV_FGP_GPU_core.h similarity index 100% rename from src/Core/regularisers_GPU/TV_FGP_GPU_core.h rename to src/Core/include/gpu/TV_FGP_GPU_core.h diff --git a/src/Core/regularisers_GPU/TV_ROF_GPU_core.h b/src/Core/include/gpu/TV_ROF_GPU_core.h similarity index 100% rename from src/Core/regularisers_GPU/TV_ROF_GPU_core.h rename to src/Core/include/gpu/TV_ROF_GPU_core.h diff --git a/src/Core/regularisers_GPU/TV_SB_GPU_core.h b/src/Core/include/gpu/TV_SB_GPU_core.h similarity index 100% rename from src/Core/regularisers_GPU/TV_SB_GPU_core.h rename to src/Core/include/gpu/TV_SB_GPU_core.h diff --git a/src/Core/regularisers_GPU/dTV_FGP_GPU_core.h b/src/Core/include/gpu/dTV_FGP_GPU_core.h similarity index 100% rename from src/Core/regularisers_GPU/dTV_FGP_GPU_core.h rename to src/Core/include/gpu/dTV_FGP_GPU_core.h diff --git a/src/Core/regularisers_GPU/shared.h b/src/Core/include/gpu/shared.h similarity index 100% rename from src/Core/regularisers_GPU/shared.h rename to src/Core/include/gpu/shared.h