Commit 17eeeab4 authored by Aitor Henry's avatar Aitor Henry

Updating frelon with Laurent version + new header and lower case cmake commands.

parent ce59e390
# CMakeLists.txt for Frelon camera
###########################################################################
# This file is part of LImA, a Library for Image Acquisition
#
# 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(CMAKE_SHARED_LINKER_FLAGS "-Wl,--add-needed")
set(frelon_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})
SET(frelon_srcs src/FrelonCamera.cpp src/FrelonInterface.cpp
src/FrelonCorrection.cpp src/Frelon.cpp
src/FrelonModel.cpp src/FrelonSerialLine.cpp
src/FrelonTimingCtrl.cpp)
target_include_directories(limafrelon PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_include_directories(limafrelon PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/tools/src")
FILE(STRINGS "VERSION" frelon_vers)
ADD_LIBRARY(limafrelon SHARED ${frelon_srcs})
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../common/espia/cmake ${CMAKE_MODULE_PATH})
include(FindEspiaDrv)
TARGET_INCLUDE_DIRECTORIES(limafrelon PUBLIC "${CMAKE_SOURCE_DIR}/camera/common/espia/include")
TARGET_INCLUDE_DIRECTORIES(limafrelon PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
#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")
#FIND_LIBRARY(FRELON_LIB nom_frelon_lib ${})
link_directories("${CMAKE_CURRENT_SOURCE_DIR}/../common/espia")
target_link_libraries(limafrelon limacore)
target_link_libraries(limafrelon ${ESPIA_DRV_LIB})
target_link_libraries(limafrelon limaespia)
TARGET_LINK_LIBRARIES(limafrelon limacore)
set_target_properties(limafrelon PROPERTIES VERSION ${frelon_vers} SOVERSION "1")
install(TARGETS limafrelon LIBRARY DESTINATION lib)
SET_TARGET_PROPERTIES(limafrelon PROPERTIES VERSION ${frelon_vers} SOVERSION "1")
if(COMPILE_SIP)
set(NAME "frelon")
set(IMPORTS
"%Import limaespia.sip")
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()
INSTALL(TARGETS limafrelon LIBRARY DESTINATION lib)
IF(COMPILE_SIP)
SET(NAME "frelon")
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/limafrelon.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(limafrelon ${CMAKE_CURRENT_BINARY_DIR}/sip/limafrelon.sip)
TARGET_INCLUDE_DIRECTORIES(python_module_limafrelon PRIVATE
${PYTHON_INCLUDE_DIRS}
"${CMAKE_SOURCE_DIR}/sip"
"${CMAKE_SOURCE_DIR}/sip/core")
TARGET_LINK_LIBRARIES(python_module_limafrelon limafrelon)
INSTALL(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Frelon")
ENDIF()
if(COMPILE_TEST)
add_subdirectory(test/)
endif()
......@@ -19,24 +19,8 @@
# 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 = 'Espia'
has_dependent = False
cleanup_data = module_helper.load_prepare(mod_path, depends_on, has_dependent)
from Lima import Espia
from limafrelon import Frelon as _F
cleanup_data = module_helper.load_dep_cleanup(cleanup_data)
from Lima.Frelon.limafrelon import *
globals().update(Frelon.__dict__)
globals().update(_F.__dict__)
from Lima.Frelon.FrelonAcq import FrelonAcq
module_helper.load_cleanup(cleanup_data)
del mod_path, depends_on, has_dependent, cleanup_data
del module_helper
###########################################################################
# This file is part of LImA, a Library for Image Acquisition
#
# 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(test_src test_frelon
test_frelon_control
test_frelon_interface
test_frelon_spectroscopy)
INCLUDE(TestCamera)
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