Commit 5800b22b authored by Aitor Henry's avatar Aitor Henry

Should be final CMake.

parent 24d07dc1
......@@ -21,38 +21,36 @@
# 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(andor3_srcs src/Andor3Camera.cpp src/Andor3Interface.cpp
set(${NAME}_srcs src/Andor3Camera.cpp src/Andor3Interface.cpp
src/Andor3DetInfoCtrlObj.cpp src/Andor3SyncCtrlObj.cpp
src/Andor3BinCtrlObj.cpp src/Andor3ReconstructionCtrlObj.cpp
src/Andor3RoiCtrlObj.cpp)
file(STRINGS "VERSION" andor3_vers)
add_library(limaandor3 SHARED ${andor3_srcs})
add_library(lima${NAME} SHARED ${${NAME}_srcs})
target_include_directories(limaandor3 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_include_directories(limaandor3 PUBLIC "/usr/local/include")
target_include_directories(lima${NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_include_directories(lima${NAME} PUBLIC "/usr/local/include")
find_library(ANDOR3_LIB_ATCORE atcore)
find_library(ANDOR3_LIB_ATUTILITY atutility)
if (("${ANDOR3_LIB_ATCORE}" STREQUAL "ANDOR3_LIB_ATCORE-NOTFOUND"))
message(FATAL_ERROR "andor3 : libatcore not found, you can search it in cmake-gui or try to install it if it isn't here.")
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_LIB_ATUTILITY}" STREQUAL "ANDOR3_LIB_ATUTILITY-NOTFOUND"))
message(FATAL_ERROR "andor3 : libatutility not found, you can search it in cmake-gui or try to install it if it isn't here.")
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(limaandor3 limacore)
target_link_libraries(limaandor3 ${ANDOR3_LIB_ATCORE})
target_link_libraries(limaandor3 ${ANDOR3_LIB_ATUTILITY})
target_link_libraries(lima${NAME} limacore)
target_link_libraries(lima${NAME} ${ANDOR3_ATCORE_LIB})
target_link_libraries(lima${NAME} ${ANDOR3_ATUTILITY_LIB})
set_target_properties(limaandor3 PROPERTIES VERSION ${andor3_vers} SOVERSION "1")
include(CameraVERSION)
install(TARGETS lima${NAME} LIBRARY DESTINATION lib)
install(TARGETS limaandor3 LIBRARY DESTINATION lib)
if(COMPILE_SIP)
set(NAME "andor3")
if(LIMA_ENABLE_PYTHON)
include(CameraRunSIP)
install(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Andor3")
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