-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
43 lines (40 loc) · 1.51 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
CMAKE_MINIMUM_REQUIRED(VERSION 3.7.2)
PROJECT(MultiTargetBuilder)
# Only UNIX systems.
SET(VERSION_MAJOR 0)
SET(VERSION_MINOR 1)
SET(VERSION_REVISION 6)
SET(VERSION_STATE rc)
SET(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}${VERSION_STATE}${VERSION_REVISION} )
IF( UNIX )
Find_PACKAGE(UnixCommands REQUIRED)
# Create distribution tarball.
SET( TARGETDIR "${PROJECT_NAME}-${VERSION}")
ADD_CUSTOM_TARGET( distribution
COMMENT "Creating distrubtion file."
COMMAND mkdir -p ${TARGETDIR}
COMMAND ${CP} -r ${CMAKE_CURRENT_SOURCE_DIR}/Editor
${CMAKE_CURRENT_SOURCE_DIR}/build.sh
${CMAKE_CURRENT_SOURCE_DIR}/package.json
${CMAKE_CURRENT_SOURCE_DIR}/README.md
${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG.md
${CMAKE_CURRENT_SOURCE_DIR}/Tests
${TARGETDIR}
COMMAND ${TAR} cf - ${TARGETDIR} | ${GZIP} -c > ${TARGETDIR}.tar.gz
COMMAND ${RM} -r ${TARGETDIR} )
# Create source distribution tarball.
SET( TARGETSOURCEDIR "${PROJECT_NAME}-Source-${VERSION}")
ADD_CUSTOM_TARGET( distribution-source
COMMENT "Creating distrubtion file."
COMMAND mkdir -p ${TARGETSOURCEDIR}
COMMAND ${CP} -r ${CMAKE_CURRENT_SOURCE_DIR}/Editor
${CMAKE_CURRENT_SOURCE_DIR}/build.sh
${CMAKE_CURRENT_SOURCE_DIR}/package.json
${CMAKE_CURRENT_SOURCE_DIR}/README.md
${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG.md
${CMAKE_CURRENT_SOURCE_DIR}/Tests
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE
${TARGETSOURCEDIR}
COMMAND ${TAR} cf - ${TARGETSOURCEDIR} | ${GZIP} -c > ${TARGETSOURCEDIR}.tar.gz
COMMAND ${RM} -r ${TARGETSOURCEDIR} )
ENDIF()