-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (55 loc) · 2.47 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
67
68
# $Id: CMakeLists.txt $
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
project(AND_DAQ)
#----------------------------------------------------------------------------
# Setup include and lib directory for this project
#
#include_directories(${PROJECT_SOURCE_DIR}/include)
#include_directories(${PROJECT_SOURCE_DIR}/CAEN/include)
#link_directories(${PROJECT_SOURCE_DIR}/CAEN/lib)
#link_libraries(CAENVMELib.lib CAENComm.lib CAEN_PLULib.lib ftd2xx.lib)
#----------------------------------------------------------------------------
# Locate sources and headers for this project
# NB: headers are included so they will show up in IDEs
#
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.c)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.h)
set(ANDDAQ_SCRIPTS
_readme.txt
README.md
config.txt
pgnuplot.exe
wgnuplot.exe
)
foreach(_script ${ANDDAQ_SCRIPTS})
configure_file(
${PROJECT_SOURCE_DIR}/${_script}
${PROJECT_BINARY_DIR}/${_script}
COPYONLY
)
endforeach()
file(COPY ${PROJECT_SOURCE_DIR}/include DESTINATION ${PROJECT_BINARY_DIR})
file(COPY ${PROJECT_SOURCE_DIR}/CAEN DESTINATION ${PROJECT_BINARY_DIR})
file(COPY ${PROJECT_SOURCE_DIR}/output DESTINATION ${PROJECT_BINARY_DIR})
file(COPY ${PROJECT_SOURCE_DIR}/histo DESTINATION ${PROJECT_BINARY_DIR})
file(COPY ${PROJECT_SOURCE_DIR}/gnuplot DESTINATION ${PROJECT_BINARY_DIR})
set(CAEN_INCLUDE_DIR ${PROJECT_BINARY_DIR}/CAEN/include)
set(CAEN_LIB_DIR ${PROJECT_BINARY_DIR}/CAEN/lib)
file(COPY ${CAEN_LIB_DIR}/CAENVMELib.dll DESTINATION ${PROJECT_BINARY_DIR})
file(COPY ${CAEN_LIB_DIR}/CAENComm.dll DESTINATION ${PROJECT_BINARY_DIR})
file(COPY ${CAEN_LIB_DIR}/CAEN_PLULib.dll DESTINATION ${PROJECT_BINARY_DIR})
file(COPY ${CAEN_LIB_DIR}/ftd2xx.dll DESTINATION ${PROJECT_BINARY_DIR})
file(COPY ${CAEN_LIB_DIR}/PlxApi.dll DESTINATION ${PROJECT_BINARY_DIR})
#----------------------------------------------------------------------------
# Add the executable
#
add_executable(AND_DAQ AND_DAQ.c ${sources} ${headers})
target_include_directories(AND_DAQ PUBLIC ${PROJECT_BINARY_DIR}/include)
target_include_directories(AND_DAQ PUBLIC ${CAEN_INCLUDE_DIR})
target_link_directories(AND_DAQ PUBLIC ${CAEN_LIB_DIR})
target_link_libraries(AND_DAQ ${CAEN_LIB_DIR}/CAENVMELib.lib)
target_link_libraries(AND_DAQ ${CAEN_LIB_DIR}/CAENComm.lib)
target_link_libraries(AND_DAQ ${CAEN_LIB_DIR}/CAEN_PLULib.lib)
target_link_libraries(AND_DAQ ${CAEN_LIB_DIR}/ftd2xx.lib)