-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathCMakeLists.txt
66 lines (52 loc) · 1.86 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
project(AntaresAnalyzer)
cmake_minimum_required(VERSION 3.0)
include(../cmake/messages.cmake)
OMESSAGE("antares-analyzer")
include(../cmake/common-settings.cmake)
# Le main
Set(SRCS main.cpp
atsp/atsp.h
atsp/atsp.hxx
atsp/atsp.cpp
atsp/load.cpp
atsp/misc.cpp
atsp/preflight.cpp
atsp/correlations.cpp
atsp/cache.cpp
)
if (WIN32)
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/win32/analyzer.o")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/win32/analyzer.rc.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/win32/analyzer.rc")
if (MINGW)
# resource compilation for mingw
ADD_CUSTOM_COMMAND(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/win32/analyzer.o"
COMMAND windres.exe "-I${CMAKE_CURRENT_SOURCE_DIR}"
"-i${CMAKE_CURRENT_SOURCE_DIR}/win32/analyzer.rc"
-o "${CMAKE_CURRENT_BINARY_DIR}/win32/analyzer.o")
SET(SRCS ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/win32/analyzer.o")
else (MINGW)
FILE(COPY "${CMAKE_CURRENT_SOURCE_DIR}/win32/analyzer.ico" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/win32/")
SET(SRCS ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/win32/analyzer.rc")
endif (MINGW)
endif (WIN32)
add_executable(antares-analyzer ${SRCS})
install(TARGETS antares-analyzer EXPORT antares-analyzer DESTINATION bin)
INSTALL(EXPORT antares-analyzer
FILE antares-analyzerConfig.cmake
DESTINATION cmake
)
target_link_libraries(antares-analyzer
PRIVATE
yuni-static-core
Antares::args_helper
${CMAKE_THREADS_LIBS_INIT}
antares-core #local.h
Antares::misc
Antares::locale
PUBLIC
Antares::study #atsp -> xcast
Antares::sys
)
import_std_libs(antares-analyzer)
executable_strip(antares-analyzer)