GitLab will be upgraded on June 23th evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit cf7a695c authored by Samuel Debionne's avatar Samuel Debionne

Rename CAMERA_ENABLE_PYTHON

parent ecdda97f
Pipeline #7064 passed with stages
in 4 minutes and 15 seconds
...@@ -62,9 +62,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${LIMA_CMAKE_INCLUDE_DIR ...@@ -62,9 +62,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${LIMA_CMAKE_INCLUDE_DIR
include(project_version) include(project_version)
# Enable python binding code compilation using sip generator # 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 python interpreter and libs
find_package(PythonInterp) find_package(PythonInterp)
find_package(PythonLibs) find_package(PythonLibs)
...@@ -126,7 +128,7 @@ target_include_directories(v4l2 PUBLIC $<BUILD_INTERFACE:${V4L2_INCLUDE_DIRS}>) ...@@ -126,7 +128,7 @@ target_include_directories(v4l2 PUBLIC $<BUILD_INTERFACE:${V4L2_INCLUDE_DIRS}>)
target_link_libraries(v4l2 PUBLIC ${V4L2_LIBRARIES}) target_link_libraries(v4l2 PUBLIC ${V4L2_LIBRARIES})
# Binding code for python # Binding code for python
if(CAMERA_ENABLE_PYTHON) if(LIMA_ENABLE_PYTHON)
include(LimaTools) include(LimaTools)
limatools_run_sip_for_camera(v4l2) limatools_run_sip_for_camera(v4l2)
endif() endif()
...@@ -166,7 +168,7 @@ install( ...@@ -166,7 +168,7 @@ install(
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
) )
if(CAMERA_ENABLE_PYTHON) if(LIMA_ENABLE_PYTHON)
install( install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/python/
DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/V4l2" DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/V4l2"
......
cmake -Bbuild -H. -G "%CMAKE_GENERATOR%" -DCAMERA_ENABLE_PYTHON=1 -DCAMERA_ENABLE_TESTS=1 -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DPYTHON_SITE_PACKAGES_DIR=%SP_DIR% -DCMAKE_FIND_ROOT_PATH=%LIBRARY_PREFIX% cmake -Bbuild -H. -G "%CMAKE_GENERATOR%" -DLIMA_ENABLE_PYTHON=1 -DCAMERA_ENABLE_TESTS=1 -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DPYTHON_SITE_PACKAGES_DIR=%SP_DIR% -DCMAKE_FIND_ROOT_PATH=%LIBRARY_PREFIX%
IF %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% IF %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
cmake --build build --config Release --target install cmake --build build --config Release --target install
......
#!/bin/bash #!/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 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