Commit 7a9a501a authored by Laurent Claustre's avatar Laurent Claustre

Merge branch 'cmake' into 'cmake'

Cmake

See merge request !1
parents 0c900768 e3ae38b7
###########################################################################
# 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 "andor3")
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--add-needed")
set(${NAME}_srcs src/Andor3Camera.cpp src/Andor3Interface.cpp
src/Andor3DetInfoCtrlObj.cpp src/Andor3SyncCtrlObj.cpp
src/Andor3BinCtrlObj.cpp src/Andor3ReconstructionCtrlObj.cpp
src/Andor3RoiCtrlObj.cpp)
add_library(lima${NAME} SHARED ${${NAME}_srcs})
target_include_directories(lima${NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_include_directories(lima${NAME} PUBLIC "/usr/local/include")
find_library(ANDOR3_ATCORE_LIB atcore)
find_library(ANDOR3_ATUTILITY_LIB atutility)
if (("${ANDOR3_ATCORE_LIB}" STREQUAL "ANDOR3_ATCORE_LIB-NOTFOUND"))
message(FATAL_ERROR "${NAME} : libatcore not found, you can search it in cmake-gui or try to install it if it isn't here.")
endif()
if (("${ANDOR3_ATUTILITY_LIB}" STREQUAL "ANDOR3_ATUTILITY_LIB-NOTFOUND"))
message(FATAL_ERROR "${NAME} : libatutility not found, you can search it in cmake-gui or try to install it if it isn't here.")
endif()
target_link_libraries(lima${NAME} limacore)
target_link_libraries(lima${NAME} ${ANDOR3_ATCORE_LIB})
target_link_libraries(lima${NAME} ${ANDOR3_ATUTILITY_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/Andor3")
endif()
src-dirs = src
test-dirs =
include ../../global.inc
......@@ -19,22 +19,6 @@
# 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 = False
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 Lima.Andor3.limaandor3 import Andor3 as _A
from limaandor3 import Andor3 as _A
globals().update(_A.__dict__)
module_helper.load_cleanup(cleanup_data)
del mod_path, depends_on, has_dependent, cleanup_data
del module_helper
# andor3 plugin Makefile
# Copyright (C) 2013 IPANEMA USR3461, CNRS/MCC.
# Written by Serge Cohen <serge.cohen@synchrotron-soleil.fr>
#
# This file 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 file 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 file. If not, see <http://www.gnu.org/licenses/>.
andor3-objs = Andor3Camera.o Andor3Interface.o Andor3DetInfoCtrlObj.o Andor3SyncCtrlObj.o Andor3RoiCtrlObj.o Andor3BinCtrlObj.o Andor3ReconstructionCtrlObj.o
SRCS = $(andor3-objs:.o=.cpp)
CXXFLAGS += -I../include -I../../../hardware/include -I../../../common/include \
-I/usr/local/include -I../../../third-party/Processlib/core/include -I../../../third-party/Processlib/tasks/include \
-Wall -pthread -fPIC -g -O2
all: Andor3.o
Andor3.o: $(andor3-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