Commit 448222e1 authored by Sebastien Petitdemange's avatar Sebastien Petitdemange

Merge branch 'cmake'

parents 345a7cc7 6c1f87a1
###########################################################################
# 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 "espia")
set(${NAME}_srcs src/Espia.cpp src/FoclaHwInterface.cpp
src/EspiaAcq.cpp src/EspiaBufferMgr.cpp
src/EspiaDev.cpp src/EspiaFocla.cpp
src/EspiaSerialLine.cpp)
add_library(lima${NAME} SHARED ${${NAME}_srcs})
target_include_directories(lima${NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
include(FindEspiaDrv)
#set paths for espia driver lib and include files
target_include_directories(lima${NAME} PUBLIC "${ESPIA_DRV_INCLUDE_DIR}")
target_link_libraries(lima${NAME} limacore)
target_link_libraries(lima${NAME} ${ESPIA_DRV_LIB})
limatools_set_library_soversion(lima${NAME} "VERSION")
install(TARGETS lima${NAME} LIBRARY DESTINATION lib)
if(LIMA_ENABLE_PYTHON)
limatools_run_sip_for_camera(${NAME})
install(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Espia")
endif()
if(LIMA_ENABLE_TESTS)
add_subdirectory(test)
endif()
###########################################################################
# 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/>.
############################################################################
execute_process(
COMMAND uname -r
OUTPUT_VARIABLE KERNEL_RELEASE
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(BLISS_DRV_DIR /segfs/bliss/source/driver)
if(KERNEL_RELEASE MATCHES "^2.6")
set(ESPIA_DRV_DIR ${BLISS_DRV_DIR}/linux-2.6/compile/redhate5/espia/release)
elseif(KERNEL_RELEASE MATCHES "^3.16")
set(ESPIA_DRV_DIR ${BLISS_DRV_DIR}/linux-3.16/compile/debian8/espia/release)
else()
message(FATAL_ERROR "Unsupported kernel release ${KERNEL_RELEASE}")
endif()
set(ESPIA_DRV_LIB_DIR ${ESPIA_DRV_DIR}/lib/x86_64)
set(ESPIA_DRV_INCLUDE_DIR ${ESPIA_DRV_DIR}/src)
link_directories(${ESPIA_DRV_LIB_DIR})
find_library(ESPIA_DRV_LIB espia ${ESPIA_DRV_LIB_DIR})
......@@ -19,23 +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 = 'Core'
has_dependent = True
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 limaespia import *
globals().update(Espia.__dict__)
module_helper.load_cleanup(cleanup_data)
del mod_path, depends_on, has_dependent, cleanup_data
del module_helper
from limaespia import Espia as _E
globals().update(_E.__dict__)
############################################################################
# This file is part of LImA, a Library for Image Acquisition
#
# Copyright (C) : 2009-2011
# Copyright (C) : 2009-2017
# European Synchrotron Radiation Facility
# BP 220, Grenoble 38043
# FRANCE
......@@ -19,7 +19,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
src-dirs = src
test-dirs = test
include ../../../global.inc
set(test_src testfocla testfoclahwinterface)
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