Commit cf22f595 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline
Browse files

Replace CAMERA_ENABLE_PYTHON by global LIMA_ENABLE_PYTHON

parent 38b23b64
......@@ -62,9 +62,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${LIMA_CMAKE_INCLUDE_DIRS} ${CMA
include(project_version)
# Enable python binding code compilation using sip generator
option(CAMERA_ENABLE_PYTHON "compile python binding code?" LIMA_ENABLE_PYTHON)
if (CAMERA_MASTER_PROJECT)
option(LIMA_ENABLE_PYTHON "compile python binding code?" OFF)
endif()
if (CAMERA_ENABLE_PYTHON)
if (LIMA_ENABLE_PYTHON)
# Find python interpreter and libs
find_package(PythonInterp)
find_package(PythonLibs)
......@@ -151,7 +153,7 @@ target_link_libraries(slsdetector
)
# Binding code for python
if(CAMERA_ENABLE_PYTHON)
if(LIMA_ENABLE_PYTHON)
include(LimaTools)
limatools_run_sip_for_camera(slsdetector)
endif()
......@@ -190,7 +192,7 @@ install(
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
if(CAMERA_ENABLE_PYTHON)
if(LIMA_ENABLE_PYTHON)
install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/
DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/SlsDetector"
......
#!/bin/bash
cmake -Bbuild -H. -DCAMERA_ENABLE_PYTHON=1 -DCAMERA_ENABLE_TESTS=1 -DCMAKE_INSTALL_PREFIX=$PREFIX -DPYTHON_SITE_PACKAGES_DIR=$SP_DIR -DCMAKE_FIND_ROOT_PATH=$PREFIX
cmake -Bbuild -H. -DLIMA_ENABLE_PYTHON=1 -DCAMERA_ENABLE_TESTS=1 -DCMAKE_INSTALL_PREFIX=$PREFIX -DPYTHON_SITE_PACKAGES_DIR=$SP_DIR -DCMAKE_FIND_ROOT_PATH=$PREFIX
cmake --build build --target install
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment