Commit ead76697 authored by Laurent Claustre's avatar Laurent Claustre

Merge branch 'cmake' of gitlab.esrf.fr:aitor/Lima-camera-frelon into cmake

Conflicts:
	CMakeLists.txt
	test/CMakeLists.txt
parents 769a56ec c584acbc
############################################################################
###########################################################################
# 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/>.
# Copyright (C) : 2009-2017
# European Synchrotron Radiation Facility
# BP 220, Grenoble 38043
# 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 "frelon")
SET(frelon_srcs src/Frelon.cpp src/FrelonSerialLine.cpp
set(${NAME}_srcs src/Frelon.cpp src/FrelonSerialLine.cpp
src/FrelonModel.cpp src/FrelonCamera.cpp
src/FrelonTimingCtrl.cpp src/FrelonInterface.cpp src/FrelonCorrection.cpp)
FILE(STRINGS "VERSION" frelon_vers)
ADD_LIBRARY(limafrelon SHARED ${frelon_srcs})
add_library(lima${NAME} SHARED ${${NAME}_srcs})
TARGET_INCLUDE_DIRECTORIES(limafrelon PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
TARGET_INCLUDE_DIRECTORIES(limafrelon PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/tools/src")
target_include_directories(lima${NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_include_directories(lima${NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/tools/src")
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../common/espia/cmake ${CMAKE_MODULE_PATH})
include(FindEspiaDrv)
#set paths for espia driver and limaespialib and include files
TARGET_INCLUDE_DIRECTORIES(limafrelon PUBLIC "${ESPIA_DRV_INCLUDE_DIR}")
TARGET_INCLUDE_DIRECTORIES(limafrelon PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../common/espia/include")
LINK_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../common/espia")
target_include_directories(lima${NAME} PUBLIC "${ESPIA_DRV_INCLUDE_DIR}")
target_include_directories(lima${NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../common/espia/include")
TARGET_LINK_LIBRARIES(limafrelon limacore)
TARGET_LINK_LIBRARIES(limafrelon ${ESPIA_DRV_LIB})
TARGET_LINK_LIBRARIES(limafrelon limaespia)
link_directories("${CMAKE_CURRENT_SOURCE_DIR}/../common/espia")
SET_TARGET_PROPERTIES(limafrelon PROPERTIES VERSION ${frelon_vers} SOVERSION "1")
target_link_libraries(lima${NAME} limacore)
target_link_libraries(lima${NAME} ${ESPIA_DRV_LIB})
target_link_libraries(lima${NAME} limaespia)
INSTALL(TARGETS limafrelon LIBRARY DESTINATION lib)
limatools_set_library_soversion(lima${NAME} "VERSION")
install(TARGETS lima${NAME} LIBRARY DESTINATION lib)
IF(COMPILE_SIP)
SET(NAME "frelon")
SET(IMPORTS
if(LIMA_ENABLE_PYTHON)
set(IMPORTS
"%Import limaespia.sip")
SET(SIP_INCLUDES ${SIP_INCLUDES}
set(SIP_INCLUDES ${SIP_INCLUDES}
"${CMAKE_CURRENT_SOURCE_DIR}/../common/espia/sip"
"${CMAKE_BINARY_DIR}/camera/common/espia/sip")
INCLUDE(CameraRunSIP)
INSTALL(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Frelon")
INSTALL(FILES python/FrelonAcq.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Frelon")
ENDIF()
limatools_run_sip_for_camera(${NAME})
install(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Frelon")
install(FILES python/FrelonAcq.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Frelon")
endif()
IF(COMPILE_TEST)
ADD_SUBDIRECTORY(test/)
ENDIF()
if(LIMA_ENABLE_TESTS)
add_subdirectory(test/)
endif()
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