-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
41 lines (35 loc) · 1.12 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
cmake_minimum_required(VERSION 3.12)
project(
Diviner
VERSION 1.0.0
HOMEPAGE_URL https://github.com/TravisWheelerLab/Diviner
)
set(CMAKE_C_STANDARD 11)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY build)
file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# Custom target for handling dependencies, Perl scripts, and shell scripts. We
# just move all these files to the build directory to aid in distribution and
# installation. These will be automatically run by the build.
add_custom_target(
build-perl ALL
COMMAND cp
${CMAKE_SOURCE_DIR}/src/*.pl
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
COMMAND cp
${CMAKE_SOURCE_DIR}/src/*.pm
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
)
add_custom_target(
build-shell ALL
COMMAND cp
${CMAKE_SOURCE_DIR}/src/run_diviner.sh
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/diviner
COMMAND ln
-s ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/diviner
${CMAKE_SOURCE_DIR}/diviner
)
add_custom_target(
build-dependencies ALL
COMMAND ${CMAKE_SOURCE_DIR}/src/install-dependencies.sh
VERBATIM
)