Commit ef66403a authored by Aitor Henry's avatar Aitor Henry

Put commands in lower case, new header.

parent 00d38e47
############################################################################
###########################################################################
# 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
# 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/>.
############################################################################
# CMakeLists.txt for Andor camera
IF(UNIX)
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--add-needed")
ENDIF()
if(UNIX)
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--add-needed")
endif()
SET(andor_srcs src/AndorCamera.cpp src/AndorInterface.cpp
set(andor_srcs src/AndorCamera.cpp src/AndorInterface.cpp
src/AndorDetInfoCtrlObj.cpp src/AndorSyncCtrlObj.cpp
src/AndorBinCtrlObj.cpp src/AndorShutterCtrlObj.cpp
src/AndorRoiCtrlObj.cpp)
FILE(STRINGS "VERSION" andor_vers)
file(STRINGS "VERSION" andor_vers)
ADD_LIBRARY(limaandor SHARED ${andor_srcs})
add_library(limaandor SHARED ${andor_srcs})
#INCLUDES
TARGET_INCLUDE_DIRECTORIES(limaandor PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
IF(WIN32)
TARGET_INCLUDE_DIRECTORIES(limaandor PUBLIC "C:/Program files/Andor SDK")
TARGET_INCLUDE_DIRECTORIES(limaandor PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/sdk/msvc/include")
ELSE()
TARGET_INCLUDE_DIRECTORIES(limaandor PUBLIC "${COMMON_PATH}/include")
ENDIF()
target_include_directories(limaandor PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
if(WIN32)
target_include_directories(limaandor PUBLIC "C:/Program files/Andor SDK")
target_include_directories(limaandor PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/sdk/msvc/include")
endif()
IF(WIN32)
TARGET_COMPILE_DEFINITIONS(limaandor PRIVATE LIBANDOR_EXPORTS)
ENDIF()
if(WIN32)
target_compile_definitions(limaandor PRIVATE LIBANDOR_EXPORTS)
endif()
#LIBRARY
IF(WIN32)
FIND_LIBRARY(ANDOR_LIB atmcd64m "C:/Program files/Andor SDK")
IF (("${ANDOR_LIB}" STREQUAL "ANDOR_LIB-NOTFOUND"))
MESSAGE(FATAL_ERROR "andor : libatmcd32d not found, you can search it in cmake-gui or try to install it if it isn't here.")
ENDIF()
ELSE()
FIND_LIBRARY(ANDOR_LIB andor)
IF (("${ANDOR_LIB}" STREQUAL "ANDOR_LIB-NOTFOUND"))
MESSAGE(FATAL_ERROR "andor : libandor not found, you can search it in cmake-gui or try to install it if it isn't here.")
ENDIF()
ENDIF()
if(WIN32)
find_library(ANDOR_LIB atmcd64m "C:/Program files/Andor SDK")
if (("${ANDOR_LIB}" STREQUAL "ANDOR_LIB-NOTFOUND"))
message(FATAL_ERROR "andor : libatmcd32d not found, you can search it in cmake-gui or try to install it if it isn't here.")
endif()
else()
find_library(ANDOR_LIB andor)
if (("${ANDOR_LIB}" STREQUAL "ANDOR_LIB-NOTFOUND"))
message(FATAL_ERROR "andor : libandor not found, you can search it in cmake-gui or try to install it if it isn't here.")
endif()
endif()
TARGET_LINK_LIBRARIES(limaandor limacore)
TARGET_LINK_LIBRARIES(limaandor ${ANDOR_LIB})
target_link_libraries(limaandor limacore)
target_link_libraries(limaandor ${ANDOR_LIB})
SET_TARGET_PROPERTIES(limaandor PROPERTIES VERSION ${andor_vers} SOVERSION "1")
IF(WIN32)
SET_TARGET_PROPERTIES(limaandor PROPERTIES PREFIX "lib")
INSTALL(TARGETS limaandor DESTINATION lib)
ELSE()
INSTALL(TARGETS limaandor LIBRARY DESTINATION lib)
ENDIF()
set_target_properties(limaandor PROPERTIES VERSION ${andor_vers} SOVERSION "1")
if(WIN32)
set_target_properties(limaandor PROPERTIES PREFIX "lib")
install(TARGETS limaandor DESTINATION lib)
else()
install(TARGETS limaandor LIBRARY DESTINATION lib)
endif()
IF(COMPILE_SIP)
SET(NAME "andor")
if(COMPILE_SIP)
set(NAME "andor")
include(CameraRunSIP)
INSTALL(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Andor")
ENDIF()
install(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Andor")
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