From 6a0560fb6d8ae40d12b5c31475b2a5908dce5aa4 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Sun, 31 Mar 2019 14:18:55 +0100 Subject: [PATCH 1/3] moved files in include and install include --- src/Core/CMakeLists.txt | 53 +++++++++---------- src/Core/{ => include}/CCPiDefines.h | 0 .../Diffusion_Inpaint_core.h | 0 .../NonlocalMarching_Inpaint_core.h | 0 .../cpu}/Diffus4th_order_core.h | 0 .../cpu}/Diffusion_core.h | 0 .../cpu}/FGP_TV_core.h | 0 .../cpu}/FGP_dTV_core.h | 0 .../cpu}/LLT_ROF_core.h | 0 .../cpu}/Nonlocal_TV_core.h | 0 .../cpu}/PatchSelect_core.h | 0 .../cpu}/ROF_TV_core.h | 0 .../cpu}/SB_TV_core.h | 0 .../cpu}/TGV_core.h | 0 .../cpu}/TNV_core.h | 0 .../{regularisers_CPU => include/cpu}/utils.h | 0 .../gpu}/Diffus_4thO_GPU_core.h | 0 .../gpu}/LLT_ROF_GPU_core.h | 0 .../gpu}/NonlDiff_GPU_core.h | 0 .../gpu}/PatchSelect_GPU_core.h | 0 .../gpu}/TGV_GPU_core.h | 0 .../gpu}/TV_FGP_GPU_core.h | 0 .../gpu}/TV_ROF_GPU_core.h | 0 .../gpu}/TV_SB_GPU_core.h | 0 .../gpu}/dTV_FGP_GPU_core.h | 0 .../gpu}/shared.h | 0 26 files changed, 25 insertions(+), 28 deletions(-) rename src/Core/{ => include}/CCPiDefines.h (100%) rename src/Core/{inpainters_CPU => include}/Diffusion_Inpaint_core.h (100%) rename src/Core/{inpainters_CPU => include}/NonlocalMarching_Inpaint_core.h (100%) rename src/Core/{regularisers_CPU => include/cpu}/Diffus4th_order_core.h (100%) rename src/Core/{regularisers_CPU => include/cpu}/Diffusion_core.h (100%) rename src/Core/{regularisers_CPU => include/cpu}/FGP_TV_core.h (100%) rename src/Core/{regularisers_CPU => include/cpu}/FGP_dTV_core.h (100%) rename src/Core/{regularisers_CPU => include/cpu}/LLT_ROF_core.h (100%) rename src/Core/{regularisers_CPU => include/cpu}/Nonlocal_TV_core.h (100%) rename src/Core/{regularisers_CPU => include/cpu}/PatchSelect_core.h (100%) rename src/Core/{regularisers_CPU => include/cpu}/ROF_TV_core.h (100%) rename src/Core/{regularisers_CPU => include/cpu}/SB_TV_core.h (100%) rename src/Core/{regularisers_CPU => include/cpu}/TGV_core.h (100%) rename src/Core/{regularisers_CPU => include/cpu}/TNV_core.h (100%) rename src/Core/{regularisers_CPU => include/cpu}/utils.h (100%) rename src/Core/{regularisers_GPU => include/gpu}/Diffus_4thO_GPU_core.h (100%) rename src/Core/{regularisers_GPU => include/gpu}/LLT_ROF_GPU_core.h (100%) rename src/Core/{regularisers_GPU => include/gpu}/NonlDiff_GPU_core.h (100%) rename src/Core/{regularisers_GPU => include/gpu}/PatchSelect_GPU_core.h (100%) rename src/Core/{regularisers_GPU => include/gpu}/TGV_GPU_core.h (100%) rename src/Core/{regularisers_GPU => include/gpu}/TV_FGP_GPU_core.h (100%) rename src/Core/{regularisers_GPU => include/gpu}/TV_ROF_GPU_core.h (100%) rename src/Core/{regularisers_GPU => include/gpu}/TV_SB_GPU_core.h (100%) rename src/Core/{regularisers_GPU => include/gpu}/dTV_FGP_GPU_core.h (100%) rename src/Core/{regularisers_GPU => include/gpu}/shared.h (100%) diff --git a/src/Core/CMakeLists.txt b/src/Core/CMakeLists.txt index b3c0dfbe..ce055e55 100644 --- a/src/Core/CMakeLists.txt +++ b/src/Core/CMakeLists.txt @@ -81,27 +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 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} CONFIGURATIONS ${CMAKE_BUILD_TYPE} ) -endif() + +install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) @@ -122,20 +117,22 @@ 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 + 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} CONFIGURATIONS ${CMAKE_BUILD_TYPE} ) - elseif(WIN32) - message ("I'd install into ${CMAKE_INSTALL_PREFIX} lib bin") - install(TARGETS cilregcuda - RUNTIME DESTINATION bin - 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 From 7330b3f67091fd8ecfadde6be7650ef2da977ba0 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Sun, 31 Mar 2019 21:43:58 +0100 Subject: [PATCH 2/3] cmake version --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') }} From ca7d7f76374aa459019450ac075450c4d89396f5 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Sun, 31 Mar 2019 22:30:26 +0100 Subject: [PATCH 3/3] fix install directory --- src/Core/CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Core/CMakeLists.txt b/src/Core/CMakeLists.txt index ce055e55..8251af8e 100644 --- a/src/Core/CMakeLists.txt +++ b/src/Core/CMakeLists.txt @@ -89,9 +89,9 @@ include_directories(cilreg PUBLIC ## Install include(GNUInstallDirs) install(TARGETS cilreg - 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} ) @@ -99,7 +99,6 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - # GPU Regularisers if (BUILD_CUDA) find_package(CUDA) @@ -124,9 +123,12 @@ if (BUILD_CUDA) ) install(TARGETS cilregcuda - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + #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} )