-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCMakeLists.txt
30 lines (23 loc) · 1.01 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
# a version for testing with later cmake, EXPERIMENTAL....
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.8)
PROJECT (runit C)
set(VERSION "2.1.3")
# Specify where we're dropping things- the end-user of this system
# can specify elsewhere, but we're going to pour it here to make
# it easier on us...
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build)
endif()
# Do our up-front config checks...
INCLUDE(GNUInstallDirs)
INCLUDE(ConfigureChecks.cmake)
# Declare our project's additional include path entries...
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_BINARY_DIR}/include)
# Add the various subdirectories for sourcecode, etc...
ADD_SUBDIRECTORY(src)
add_custom_target(dist
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMAND "${CMAKE_COMMAND}" -E remove -F "${CMAKE_CURRENT_BINARY_DIR}/runit-*.tar.gz"
COMMAND git archive -o "${CMAKE_CURRENT_BINARY_DIR}/runit-${VERSION}.tar.gz" --format tar.gz --prefix="runit-${VERSION}/" HEAD
)