forked from testcocoon/testcocoon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
55 lines (45 loc) · 1.99 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
cmake_minimum_required(VERSION 2.6.0)
FIND_PACKAGE(LATEX)
project(TestCocoon) # the name of your project
include("src/commoncode/common.cmake")
include("src/commoncode/version.cmake")
add_subdirectory("src")
IF(LATEX_COMPILER)
add_subdirectory("doc")
ENDIF(LATEX_COMPILER)
MESSAGE( STATUS "Build mode: " ${CMAKE_BUILD_TYPE_UPPER} )
MESSAGE( STATUS "TestCocoon Version: " ${TESTCOCOON_VERSION_DOT} )
SET(SRCTBZ2 ${CMAKE_CURRENT_SOURCE_DIR}/binaries/testcocoon-src-${TESTCOCOON_VERSION_DOT}.tar.bz2)
SET(SRC_CONTAINS HEAD src/ gen/ doc/ cppunit-1.12.0/ tutorial/ CMakeLists.txt)
ADD_CUSTOM_TARGET(src
COMMAND git archive --format=tar --prefix=testcocoon-src-${TESTCOCOON_VERSION_DOT}/ ${SRC_CONTAINS}| bzip2 > ${SRCTBZ2}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
IF (WIN32)
set_property(TARGET src PROPERTY FOLDER "Tools")
ENDIF()
# uninstall target
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/src/commoncode/make_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/src/commoncode/make_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/src/commoncode/make_uninstall.cmake)
INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_PACKAGE_NAME "TestCocoon")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Code Coverage for C++ and C#")
SET(CPACK_PACKAGE_VENDOR "see src/AUTHORS file")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.TXT")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/src/LICENSE.TXT")
SET(CPACK_PACKAGE_VERSION_MAJOR ${TESTCOCOON_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${TESTCOCOON_VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${TESTCOCOON_VERSION_PATCH})
IF("${CMAKE_SYSTEM}" MATCHES "Linux")
SET(CPACK_GENERATOR "DEB;TBZ2;STGZ")
SET(CPACK_PACKAGE_CONTACT "[email protected]")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-network, libqt4-xml, libqt4-svg")
ENDIF("${CMAKE_SYSTEM}" MATCHES "Linux")
IF(WIN32)
SET(CPACK_GENERATOR "ZIP")
ENDIF(WIN32)
INCLUDE(CPack)