Commit edffbf3e authored by Sebastien Petitdemange's avatar Sebastien Petitdemange

Merge branch 'cmake'

parents e41d908a 6c5166c4
stages:
- build
- test
build :
stage: build
script:
- cd ..
- cp -R /root/* .
- ./install_lima_submodule
- cd lima/camera/v4l2
- cp -R ../../../lima-camera-v4l2/* .
- cd ../..
- ./install.sh camera/v4l2 python tests cbf fits tiff hdf5 config
- cd ../lima-camera-v4l2
- cp -R ../lima .
artifacts:
paths:
- lima/
only:
- cmake
test :
stage: test
dependencies:
- build
script:
- cd ..
- cp -R lima-camera-v4l2/lima .
- cd lima/cmake-build/
- ctest --timeout 10
only:
- cmake
###########################################################################
# This file is part of LImA, a Library for Image Acquisition
#
# Copyright (C) : 2009-2017
# European Synchrotron Radiation Facility
# CS40220 38043 Grenoble Cedex 9
# FRANCE
#
# Contact: lima@esrf.fr
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
set(NAME "v4l2")
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--add-needed")
#SOURCEs
set(${NAME}_srcs src/V4L2Camera.cpp src/V4L2Interface.cpp
src/V4L2DetInfoCtrlObj.cpp src/V4L2SyncCtrlObj.cpp
src/V4L2VideoCtrlObj.cpp)
add_library(lima${NAME} SHARED ${${NAME}_srcs})
#INCLUDEs
target_include_directories(lima${NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
#LIBRARIES
find_library(V4L2_LIB v4l2)
if("${V4L2_LIB}" STREQUAL "V4L2_LIB-NOTFOUND")
message(FATAL_ERROR "${NAME} : libv4l2 not found, you can search it in cmake-gui or try to install it if it isn't here.")
endif()
target_link_libraries(lima${NAME} limacore)
target_link_libraries(lima${NAME} ${V4L2_LIB})
limatools_set_library_soversion(lima${NAME} "VERSION")
include(GNUInstallDirs)
install(TARGETS lima${NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(LIMA_ENABLE_PYTHON)
limatools_run_sip_for_camera(${NAME})
install(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/V4l2")
endif()
src-dirs = src
test-dirs =
include ../../global.inc
......@@ -19,22 +19,6 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
from Lima import module_helper
mod_path = __path__
depends_on = 'Core'
has_dependent = False
cleanup_data = module_helper.load_prepare(mod_path, depends_on, has_dependent)
from Lima import Core
cleanup_data = module_helper.load_dep_cleanup(cleanup_data)
from Lima.v4l2.limav4l2 import V4L2 as _V4l2
from limav4l2 import V4L2 as _V4l2
globals().update(_V4l2.__dict__)
module_helper.load_cleanup(cleanup_data)
del mod_path, depends_on, has_dependent, cleanup_data
del module_helper
v4l2-objs = V4L2DetInfoCtrlObj.o V4L2SyncCtrlObj.o V4L2Interface.o V4L2VideoCtrlObj.o
SRCS = $(v4l2-objs:.o=.cpp)
CXXFLAGS += -I../include -I../../../hardware/include -I../../../common/include -I../../../third-party/Processlib/core/include -pthread -fPIC -g
all: V4L2.o
V4L2.o: $(v4l2-objs)
$(LD) -o $@ -r $+
clean:
rm -f *.o *.P
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -pedantic -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
%.o : %.cpp
$(COMPILE.cpp) -MD $(CXXFLAGS) -o $@ $<
@cp $*.d $*.P; \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
rm -f $*.d
-include $(SRCS:.cpp=.P)
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