CMakeLists.txt 796 B

1234567891011121314151617181920212223
  1. cmake_minimum_required (VERSION 2.8.12)
  2. enable_testing()
  3. project(component_checks)
  4. set(MATLAB_FIND_DEBUG TRUE)
  5. # the success of the following command is dependent on the current configuration:
  6. # - on 32bits builds (cmake is building with 32 bits), it looks for 32 bits Matlab
  7. # - on 64bits builds (cmake is building with 64 bits), it looks for 64 bits Matlab
  8. find_package(Matlab REQUIRED COMPONENTS MX_LIBRARY ENG_LIBRARY MAT_LIBRARY MAIN_PROGRAM)
  9. message(STATUS "FindMatlab libraries: ${Matlab_LIBRARIES}")
  10. matlab_add_mex(
  11. # target name
  12. NAME cmake_matlab_test_wrapper1
  13. # output name
  14. OUTPUT_NAME cmake_matlab_mex1
  15. SRC ${CMAKE_CURRENT_SOURCE_DIR}/../matlab_wrapper1.cpp
  16. DOCUMENTATION ${CMAKE_CURRENT_SOURCE_DIR}/../help_text1.m.txt
  17. LINK_TO ${Matlab_LIBRARIES}
  18. )