Skip to content

Commit

Permalink
added PYTHON_DEST_DIR and MATLAB_DEST_DIR cached vars
Browse files Browse the repository at this point in the history
  • Loading branch information
paskino committed Apr 27, 2018
1 parent 396bba7 commit ea68ad0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ find_package(PythonInterp)
find_package(PythonLibs)
set (BUILD_PYTHON ${PYTHONLIBS_FOUND})
if (BUILD_PYTHON)
if (NOT PYTHON_DEST)
set(PYTHON_INSTALL_DIR "" CACHE "Directory of the SIRF Python modules")
if (PYTHON_INSTALL_DIR)
set(PYTHON_DEST "${PYTHON_INSTALL_DIR }")
else()
set(PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/python")
endif()
message(STATUS "Python libraries found")
message(STATUS "Location of Python modules: " ${PYTHON_DEST})
endif()
Expand All @@ -86,10 +88,16 @@ endif()
message(STATUS "Attempting to find MATLAB (This might launch MATLAB so might take a while)")
FIND_PACKAGE(Matlab COMPONENTS MAIN_PROGRAM)
set (BUILD_MATLAB ${Matlab_FOUND})

if (BUILD_MATLAB)
matlab_get_mex_suffix("${Matlab_ROOT_DIR}" MATLAB_MEX_EXT)
set(MATLAB_DEST "${CMAKE_INSTALL_PREFIX}/matlab")
message(STATUS "MATLAB libraries found")
set(MATLAB_INSTALL_DIR "" CACHE "Directory of the SIRF Matlab libraries")
if (MATLAB_INSTALL_DIR)
set(MATLAB_DEST "${MATLAB_INSTALL_DIR }")
else()
set(MATLAB_DEST "${CMAKE_INSTALL_PREFIX}/matlab")
message(STATUS "Matlab libraries found")
message(STATUS "Location of Matlab libraries: " ${MATLAB_DEST})
endif()

if (NOT BUILD_MATLAB AND NOT BUILD_PYTHON)
Expand Down

1 comment on commit ea68ad0

@casperdcl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this mean that in the SuperBuild's External_STIR.cmake we'd need -DPYTHON_INSTALL_DIR=... rather than -DPYTHON_DEST=...?

Please sign in to comment.