summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2018-08-04 23:07:29 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2018-08-04 23:07:29 +0100
commita73d878e3f444316a2bb92b851f790d93992c46d (patch)
treebe17d9d54842d5f3cc46bde0b3cb779acacc4906
parentbd874abcebae787ea1f1fddc138fb67a8abf9c9b (diff)
downloadregularization-a73d878e3f444316a2bb92b851f790d93992c46d.tar.gz
regularization-a73d878e3f444316a2bb92b851f790d93992c46d.tar.bz2
regularization-a73d878e3f444316a2bb92b851f790d93992c46d.tar.xz
regularization-a73d878e3f444316a2bb92b851f790d93992c46d.zip
beginning of CMake compiled Matlab binding
-rw-r--r--Wrappers/CMakeLists.txt9
-rwxr-xr-xWrappers/Matlab/CMakeLists.txt29
2 files changed, 38 insertions, 0 deletions
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('<<<<<<<<<<<Compiling CPU regularisers>>>>>>>>>>>>>')
+
+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