Commit 454f86d7 authored by Aitor Henry's avatar Aitor Henry

License and deleting Makefiles.

Also update SIP compile, using CameraRunSIP.cmake.
parent 5798a261
############################################################################
# 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 Pointgrey camera
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--add-needed")
#SOURCEs
SET(pointgrey_srcs src/PointGreyCamera.cpp src/PointGreyInterface.cpp
src/PointGreyDetInfoCtrlObj.cpp src/PointGreySyncCtrlObj.cpp)
FILE(STRINGS "VERSION" pointgrey_vers)
ADD_LIBRARY(limapointgrey SHARED ${pointgrey_srcs})
#INCLUDEs
TARGET_INCLUDE_DIRECTORIES(limapointgrey PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
TARGET_INCLUDE_DIRECTORIES(limapointgrey PUBLIC "${COMMON_PATH}/../include/flycapture")
TARGET_INCLUDE_DIRECTORIES(limapointgrey PUBLIC "${COMMON_PATH}/../include/flycapture/C")
#LIBRARIES
FIND_LIBRARY(POINTGREY_LIB_FLYCAPTURE flycapture)
IF("${POINTGREY_LIB_FLYCAPTURE}" STREQUAL "POINTGREY_LIB_FLYCAPTURE-NOTFOUND")
MESSAGE(FATAL_ERROR "pointgrey : flycapture not found, you can search it in cmake-gui or try to install it if it isn't here.")
ENDIF()
TARGET_LINK_LIBRARIES(limapointgrey limacore)
TARGET_LINK_LIBRARIES(limapointgrey ${POINTGREY_LIB_FLYCAPTURE})
......@@ -24,33 +51,6 @@ INSTALL(TARGETS limapointgrey LIBRARY DESTINATION lib)
IF(COMPILE_SIP)
SET(NAME "pointgrey")
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/limapointgrey.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(limapointgrey ${CMAKE_CURRENT_BINARY_DIR}/sip/limapointgrey.sip)
TARGET_INCLUDE_DIRECTORIES(python_module_limapointgrey PRIVATE
${PYTHON_INCLUDE_DIRS}
"${CMAKE_SOURCE_DIR}/sip"
"${CMAKE_SOURCE_DIR}/sip/core")
TARGET_LINK_LIBRARIES(python_module_limapointgrey limapointgrey)
include(CameraRunSIP)
INSTALL(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/PointGrey")
ENDIF()
src-dirs = src
test-dirs =
include ../../global.inc
from Lima import Core
from limapointgrey import PointGrey as _PG
globals().update(_PG.__dict__)
pointgrey-objs = PointGreyCamera.o \
PointGreyInterface.o \
PointGreyDetInfoCtrlObj.o \
PointGreySyncCtrlObj.o
SRCS = $(pointgrey-objs:.o=.cpp)
CXXFLAGS += -I../include -I../../../hardware/include -I../../../common/include \
-I/usr/include/flycapture \
-fPIC -g -DUSE_GIGE
all: PointGrey.o
PointGrey.o: $(pointgrey-objs)
$(LD) -o $@ -r $+
clean:
rm -f *.o *.P
%.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)
.PHONY: check-syntax
check-syntax:
$(CXX) -Wall -Wextra -fsyntax-only $(CXXFLAGS) $(CHK_SOURCES)
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