forked from ufo-kit/uca-andor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
66 lines (49 loc) · 1.45 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
cmake_minimum_required(VERSION 2.6)
if (POLICY CMP0053)
cmake_policy(SET CMP0053 OLD)
endif ()
if (POLICY CMP0054)
cmake_policy(SET CMP0054 OLD)
endif ()
project(ucaandor C)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
find_package(Atcore REQUIRED)
find_package(Atutility REQUIRED)
find_package(PkgConfig REQUIRED)
include(FindPackageHandleStandardArgs)
include(PkgConfigVars)
add_definitions("-std=c99 -Wall -fPIC")
add_definitions(-DG_LOG_DOMAIN="Uca-Andor")
set(ignoreMe "${ZERO_BASED_ROI}")
if (DEFINED ZERO_BASED_ROI)
add_definitions(-DZERO_BASED_ROI -DZERO_BASED_AOI)
endif (DEFINED ZERO_BASED_ROI)
pkg_check_modules(GLIB2 glib-2.0 REQUIRED)
pkg_check_modules(UCA libuca>=2.1.0 REQUIRED)
pkg_check_variable(libuca plugindir)
include(Glib2MkEnums)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${ATCORE_INCLUDE_DIRS}
${ATUTILITY_INCLUDE_DIRS}
${UCA_INCLUDE_DIRS}
${GLIB2_INCLUDE_DIRS}
${GLIB2_INCLUDEDIR}/glib-2.0
${GLIB2_LIBDIR}/glib-2.0/include)
glib2_mkenums(uca-andor-enums
uca-andor-enums
uca-andor-camera.h)
link_directories(
${UCA_LIBRARY_DIRS}
${ANDOR_LIBRARY_DIRS})
add_library(ucaandor SHARED
uca-andor-camera.c
uca-andor-enums.c)
target_link_libraries(ucaandor
${UCA_LIBRARIES}
${ATUTILITY_LIBRARIES}
${ATCORE_LIBRARIES})
install(TARGETS ucaandor
LIBRARY DESTINATION ${LIBUCA_PLUGINDIR}
RUNTIME DESTINATION ${LIBUCA_PLUGINDIR})