From a73d878e3f444316a2bb92b851f790d93992c46d Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Sat, 4 Aug 2018 23:07:29 +0100 Subject: beginning of CMake compiled Matlab binding --- Wrappers/CMakeLists.txt | 9 +++++++++ Wrappers/Matlab/CMakeLists.txt | 29 +++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100755 Wrappers/Matlab/CMakeLists.txt diff --git a/Wrappers/CMakeLists.txt b/Wrappers/CMakeLists.txt index cbe2fec..9ae1be1 100644 --- a/Wrappers/CMakeLists.txt +++ b/Wrappers/CMakeLists.txt @@ -11,4 +11,13 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +find_package(Matlab) +if (MATLAB_FOUND) + message(Matlab) + add_subdirectory(Matlab) +else() + message("Matlab not found") +endif() + add_subdirectory(Python) \ No newline at end of file diff --git a/Wrappers/Matlab/CMakeLists.txt b/Wrappers/Matlab/CMakeLists.txt new file mode 100755 index 0000000..349baf6 --- /dev/null +++ b/Wrappers/Matlab/CMakeLists.txt @@ -0,0 +1,29 @@ +project(regulariserMatlab) + +message('<<<<<<<<<<>>>>>>>>>>>>') + +message('Compiling ROF-TV...') +#mex ROF_TV.c ROF_TV_core.c utils.c COMPFLAGS="\$COMPFLAGS -fopenmp -Wall -std=c99" +#movefile('ROF_TV.mex*',Pathmove); + + +find_package(Matlab COMPONENTS MAIN_PROGRAM MX_LIBRARY ENG_LIBRARY ) +message ("Matlab mex library " ${Matlab_LIBRARIES}) + + + +#C:\Users\ofn77899\Documents\Projects\CCPi\GitHub\CCPi-FISTA_Reconstruction\Core\regularisers_CPU +matlab_add_mex( + NAME MatlabWrapper + SRC + #${CMAKE_SOURCE_DIR}/Wrappers/Matlab/mex_compile/regularisers_CPU/ROF_TV.c + ${CMAKE_SOURCE_DIR}/Wrappers/Matlab/mex_compile/regularisers_CPU/TNV.c + LINK_TO cilreg ${Matlab_LIBRARIES} + ) + +target_include_directories(MatlabWrapper + PUBLIC ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU + ${CMAKE_SOURCE_DIR}/Core/regularisers_GPU + ${CMAKE_SOURCE_DIR}/Core/inpainters_CPU + ${CMAKE_SOURCE_DIR}/Core/ + ${MATLAB_INCLUDE_DIR}) \ No newline at end of file -- cgit v1.2.3