diff options
-rw-r--r-- | CMakeLists.txt | 17 | ||||
-rw-r--r-- | Core/CMakeLists.txt | 11 | ||||
-rwxr-xr-x | Wrappers/Matlab/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Wrappers/Python/CMakeLists.txt | 11 |
4 files changed, 31 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a783664..06e9c78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,5 +35,22 @@ option (BUILD_PYTHON_WRAPPER "Build Python Wrappers" ON) option (CONDA_BUILD "Conda Build" OFF) option (BUILD_CUDA "Build the CUDA modules" ON) +set(MATLAB_DEST_DIR "" CACHE PATH "Directory of the Matlab wrappers") +if (MATLAB_DEST_DIR) +set(MATLAB_DEST "${MATLAB_DEST_DIR}") +else() +set(MATLAB_DEST "${CMAKE_INSTALL_PREFIX}/matlab") +endif() +message(STATUS "Matlab wrappers will be installed in " ${MATLAB_DEST}) + +set(PYTHON_DEST_DIR "" CACHE PATH "Directory of the Matlab wrappers") +if (PYTHON_DEST_DIR) + set(PYTHON_DEST "${PYTHON_DEST_DIR}") +else() + set(PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/python") +endif() +message(STATUS "Python wrappers will be installed in " ${PYTHON_DEST}) + + add_subdirectory(Core) add_subdirectory(Wrappers) diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index 9ee6c7a..ca6879a 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -101,6 +101,8 @@ message ("I'd install into ${CMAKE_INSTALL_PREFIX} lib bin") ) endif() + + # GPU Regularisers if (BUILD_CUDA) find_package(CUDA) @@ -135,3 +137,12 @@ if (BUILD_CUDA) message("CUDA NOT FOUND") endif() endif() + +if (${BUILD_MATLAB_WRAPPER}) + if (WIN32) + install(TARGETS cilreg DESTINATION ${MATLAB_DEST}) + if (CUDA_FOUND) + install(TARGETS cilregcuda DESTINATION ${MATLAB_DEST}) + endif() + endif() +endif()
\ No newline at end of file diff --git a/Wrappers/Matlab/CMakeLists.txt b/Wrappers/Matlab/CMakeLists.txt index 837993d..0c26148 100755 --- a/Wrappers/Matlab/CMakeLists.txt +++ b/Wrappers/Matlab/CMakeLists.txt @@ -2,13 +2,7 @@ project(regulariserMatlab) find_package(Matlab REQUIRED COMPONENTS MAIN_PROGRAM MX_LIBRARY ENG_LIBRARY )
-set(MATLAB_DEST_DIR "" CACHE PATH "Directory of the Matlab wrappers")
-if (MATLAB_DEST_DIR)
-set(MATLAB_DEST "${MATLAB_DEST_DIR}")
-else()
-set(MATLAB_DEST "${CMAKE_INSTALL_PREFIX}/matlab")
-endif()
-message(STATUS "Matlab wrappers will be installed in " ${MATLAB_DEST})
+
#C:\Users\ofn77899\Documents\Projects\CCPi\GitHub\CCPi-FISTA_Reconstruction\Core\regularisers_CPU
@@ -148,6 +142,6 @@ message("number of GPU files " ${num}) endforeach()
add_custom_target(MatlabWrapperGPU DEPENDS ${GPU_MEX_TARGETS})
-
+
endif()
endif()
diff --git a/Wrappers/Python/CMakeLists.txt b/Wrappers/Python/CMakeLists.txt index 68768bc..d86d0ea 100644 --- a/Wrappers/Python/CMakeLists.txt +++ b/Wrappers/Python/CMakeLists.txt @@ -16,16 +16,7 @@ find_package(PythonInterp REQUIRED) if (PYTHONINTERP_FOUND) message ("Current Python " ${PYTHON_VERSION_STRING} " found " ${PYTHON_EXECUTABLE}) endif() -if (CONDA_BUILD) -else() -set(PYTHON_DEST_DIR "" CACHE PATH "Directory of the Matlab wrappers") - if (PYTHON_DEST_DIR) - set(PYTHON_DEST "${PYTHON_DEST_DIR}") - else() - set(PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/python") - endif() - message(STATUS "Python wrappers will be installed in " ${PYTHON_DEST}) -endif() + ## Build the regularisers package as a library message("Creating Regularisers as shared library") |