Commit 4bbc1ecc authored by Aitor Henry's avatar Aitor Henry Committed by Sebastien Petitdemange

License and deleting Makefiles.

Also update SIP compile, using CameraRunSIP.cmake.
parent 37db2648
############################################################################
# This file is part of LImA, a Library for Image Acquisition
#
# Copyright (C) : 2009-2017
# European Synchrotron Radiation Facility
# BP 220, Grenoble 38043
# FRANCE
#
# 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/>.
############################################################################
# CMakeLists.txt for V4l2 camera
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--add-needed")
......@@ -15,6 +36,9 @@ TARGET_INCLUDE_DIRECTORIES(limav4l2 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include"
#LIBRARIES
FIND_LIBRARY(V4L2_LIB v4l2)
IF("${V4L2_LIB}" STREQUAL "V4L2_LIB-NOTFOUND")
MESSAGE(FATAL_ERROR "v4l2 : libv4l2 not found, you can search it in cmake-gui or try to install it if it isn't here.")
ENDIF()
TARGET_LINK_LIBRARIES(limav4l2 limacore)
TARGET_LINK_LIBRARIES(limav4l2 ${V4L2_LIB})
......@@ -26,33 +50,6 @@ INSTALL(TARGETS limav4l2 LIBRARY DESTINATION lib)
IF(COMPILE_SIP)
SET(NAME "v4l2")
SET(INCLUDES)
FILE(GLOB sipfiles RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/sip" "${CMAKE_CURRENT_SOURCE_DIR}/sip/*.sip")
FOREACH(sipfile ${sipfiles})
SET(INCLUDES
"${INCLUDES}
%Include ${sipfile}")
ENDFOREACH()
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sip/limamodules.sip.in sip/limav4l2.sip)
SET(SIP_CONCAT_PARTS 1)
SET(SIP_INCLUDES ${SIP_INCLUDES}
"${CMAKE_SOURCE_DIR}/third-party/Processlib/sip"
"${CMAKE_BINARY_DIR}/sip/core"
"${CMAKE_SOURCE_DIR}/third-party/Processlib/tasks/sip"
"${CMAKE_SOURCE_DIR}/common/sip"
"${CMAKE_SOURCE_DIR}/hardware/sip"
"${CMAKE_SOURCE_DIR}/control/sip"
"${CMAKE_SOURCE_DIR}/control/software_operation/sip"
"${CMAKE_CURRENT_SOURCE_DIR}/sip")
set(SIP_DISABLE_FEATURES WITH_CONFIG)
set(SIP_CHECK_EXC ON)
ADD_SIP_PYTHON_MODULE(limav4l2 ${CMAKE_CURRENT_BINARY_DIR}/sip/limav4l2.sip)
TARGET_INCLUDE_DIRECTORIES(python_module_limav4l2 PRIVATE
${PYTHON_INCLUDE_DIRS}
"${CMAKE_SOURCE_DIR}/sip"
"${CMAKE_SOURCE_DIR}/sip/core")
TARGET_LINK_LIBRARIES(python_module_limav4l2 limav4l2)
include(CameraRunSIP)
INSTALL(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/V4l2")
ENDIF()
src-dirs = src
test-dirs =
include ../../global.inc
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