source: ThirdParty/levmar/matlab/CMakeLists.txt@ 7516f6

Action_Thermostats Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.1 ChemicalSpaceEvaluator Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Exclude_Hydrogens_annealWithBondGraph Fix_Verbose_Codepatterns ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion Gui_displays_atomic_force_velocity JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool PythonUI_with_named_parameters Recreated_GuiChecks StoppableMakroAction TremoloParser_IncreasedPrecision
Last change on this file since 7516f6 was 8ce1a9, checked in by Frederik Heber <heber@…>, 8 years ago

Merge commit '5443b10a06f0c125d0ae0500abb09901fda9666b' as 'ThirdParty/levmar'

  • Property mode set to 100644
File size: 2.2 KB
Line 
1# CMake file for levmar's MEX-file; see http://www.cmake.org
2# Requires FindMatlab.cmake included with cmake
3
4PROJECT(LEVMARMEX)
5#CMAKE_MINIMUM_REQUIRED(VERSION 1.4)
6
7INCLUDE("C:/Program Files/CMake 2.4/share/cmake-2.4/Modules/FindMatlab.cmake")
8
9# f2c is sometimes equivalent to libF77 & libI77; in that case, set HAVE_F2C to 0
10SET(HAVE_F2C 1 CACHE BOOL "Do we have f2c or F77/I77?" )
11
12# the directory where the lapack/blas/f2c libraries reside
13SET(LAPACKBLAS_DIR /usr/lib CACHE PATH "Path to lapack/blas libraries")
14
15# the directory where levmar.h resides
16SET(LM_H_DIR .. CACHE PATH "Path to levmar.h")
17# the directory where the levmar library resides
18SET(LEVMAR_DIR .. CACHE PATH "Path to levmar library")
19
20# actual names for the lapack/blas/f2c libraries
21SET(LAPACK_LIB lapack CACHE STRING "The name of the lapack library")
22SET(BLAS_LIB blas CACHE STRING "The name of the blas library")
23IF(HAVE_F2C)
24 SET(F2C_LIB f2c CACHE STRING "The name of the f2c library")
25ELSE(HAVE_F2C)
26 SET(F77_LIB libF77 CACHE STRING "The name of the F77 library")
27 SET(I77_LIB libI77 CACHE STRING "The name of the I77 library")
28ENDIF(HAVE_F2C)
29
30########################## NO CHANGES BEYOND THIS POINT ##########################
31
32INCLUDE_DIRECTORIES(${LM_H_DIR})
33LINK_DIRECTORIES(${LAPACKBLAS_DIR} ${LEVMAR_DIR})
34
35SET(SRC levmar.c)
36
37# naming conventions for the generated file's suffix
38IF(WIN32)
39 SET(SUFFIX ".mexw32")
40ELSE(WIN32)
41 SET(SUFFIX ".mexglx")
42ENDIF(WIN32)
43
44SET(OUTNAME "levmar${SUFFIX}")
45
46ADD_LIBRARY(${OUTNAME} MODULE ${SRC})
47
48IF(HAVE_F2C)
49 ADD_CUSTOM_COMMAND(OUTPUT ${OUTNAME}
50 DEPENDS ${SRC}
51 COMMAND mex
52 ARGS -O -I${LM_H_DIR} ${SRC} -I${MATLAB_INCLUDE_DIR} -L${LAPACKBLAS_DIR} -L${LEVMAR_DIR} -L${MATLAB_MEX_LIBRARY} -llevmar -l${LAPACK_LIB} -l${BLAS_LIB} -l${F2C_LIB} -output ${MATLAB_LIBRARIES} ${OUTNAME})
53ELSE(HAVE_F2C)
54 ADD_CUSTOM_COMMAND(OUTPUT ${OUTNAME}
55 DEPENDS ${SRC}
56 COMMAND mex
57 ARGS -O -I${LM_H_DIR} ${SRC} -I${MATLAB_INCLUDE_DIR} -L${LAPACKBLAS_DIR} -L${LEVMAR_DIR} -L${MATLAB_MEX_LIBRARY} -llevmar -l${LAPACK_LIB} -l${BLAS_LIB} -l${F77_LIB} -l${I77_LIB} ${MATLAB_LIBRARIES} -output ${OUTNAME})
58ENDIF(HAVE_F2C)
Note: See TracBrowser for help on using the repository browser.