-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
112 lines (93 loc) · 4.03 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# -*- mode: cmake; -*-
project(chumby)
cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
if(POLICY CMP0011)
cmake_policy(SET CMP0011 NEW)
endif(POLICY CMP0011)
set(CHUMBY_MAJOR_VERSION 0)
set(CHUMBY_MINOR_VERSION 1)
set(CHUMBY_SUB_VERSION 0)
set(VERSION_SEP "-")
set(CHUMBY_SHORT_VERSION "${CHUMBY_MAJOR_VERSION}${VERSION_SEP}${CHUMBY_MINOR_VERSION}")
set(CHUMBY_VERSION "${CHUMBY_SHORT_VERSION}${VERSION_SEP}${CHUMBY_SUB_VERSION}")
set(CHUMBY_RPM_VERSION "${CHUMBY_MAJOR_VERSION}.${CHUMBY_MINOR_VERSION}.${CHUMBY_SUB_VERSION}")
set(VERSION_DATE "2012-08-24")
set(PANEL_DIR "chumby-controlpanel/controlpanel")
set(PLUGIN_DIR "chumby-controlpanel/plugins")
###########################################################
# Where are the additional libraries installed? Note: provide includes
# path here, subsequent checks will resolve everything else
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
include ( CompilerFlags )
include(FindQt4)
include(UseQt4)
message(STATUS "QT: '${QT_LIBRARIES}'")
IF(NOT QT_FOUND)
message(FATAL_ERROR "No QT4 found, cannot continue.")
ENDIF(NOT QT_FOUND)
# search for alsa sound
find_package(ASound)
# search for iwlib
# search for libts
find_package(LibTS)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXXFLAGS}")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC --rtti -W -Wall -Wextra ")
#set(CMAKE_CC_FLAGS "${CMAKE_CC_FLAGS} -fPIC")
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR})
include_directories(${${PROJECT_NAME}_SOURCE_DIR} ${${PROJECT_NAME}_BINARY_DIR})
include_directories(${TOOLCHAIN_PREFIX}/usr/include)
include_directories(${QT_INCLUDES})
link_directories(${QT_LIBRARY_DIR})
link_directories(${TOOLCHAIN_PREFIX}/usr/lib)
add_subdirectory(controlpanel)
add_subdirectory(plugins)
add_subdirectory(tools)
# enable unit testing
include(CTest)
enable_testing()
### print some output for the user
message("")
message(" ***** Configuration parameters *****")
message(" prefix: ${CMAKE_INSTALL_PREFIX}")
# add some files to the installation target
INSTALL(FILES README INSTALL COPYRIGHT DESTINATION
share/doc/chumby-${V_MAJOR}-${V_MINOR}
)
# CPACK packaging
INCLUDE(InstallRequiredSystemLibraries)
set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Gridlicense Demo Tools")
set(CPACK_PACKAGE_VENDOR "Fraunhofer ITWM")
set(CPACK_PACKAGE_CONTACT "Kai Krueger <krueger@itwm.fhg.de>")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Kai Krueger <krueger@itwm.fhg.de>")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT")
set(CPACK_PACKAGE_VERSION_MAJOR ${V_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${V_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${V_PATCH})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}-${V_MAJOR}.${V_MINOR}")
set(CPACK_SOURCE_IGNORE_FILES "/CVS/;/.svn/;.swp$;.#;/#;.*~;cscope.*;build.*")
IF(WIN32 AND NOT UNIX)
set(CPACK_GENERATOR "NSIS")
set(CPACK_NSIS_PACKAGE_NAME "Gridlicense Demo Tools")
# set(CPACK_PACKAGE_EXECUTABLES "gui4" "Grid License Demo Frontend")
set(CPACK_PACKAGE_DEFAULT_LOCATION ${INSTALL_DIR})
# sure there is at least one set of four (4) backlasshes.
set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\gui4.exe")
set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} Gridlicense Demo Tools")
set(CPACK_NSIS_HELP_LINK "http://www.itwm.fraunhofer.de/")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.itwm.fraunhofer.de/abteilungen/hpc.html")
set(CPACK_NSIS_CONTACT "Kai Krueger <krueger@itwm.fhg.de>")
set(CPACK_NSIS_MODIFY_PATH ON)
# set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CMAKE_PROJECT_NAME}-${EWS_VERSION}")
# set(CPACK_NSIS_MENU_LINKS "${EWS_WEBSITE}" "Homepage for ${EWS_APP_NAME}")
set(CPACK_NSIS_DEFINES " !define MUI_WELCOMEPAGE_TITLE_3LINES 1
!define MUI_FINISHPAGE_TITLE_3LINES 1")
else(WIN32 AND NOT UNIX)
#set(CPACK_SET_DESTDIR On)
set(CPACK_SOURCE_STRIP_FILES "")
set(CPACK_GENERATOR "TGZ;TBZ2;ZIP")
set(CPACK_RPM_PACKAGE_RELOCATABLE 1)
endif(WIN32 AND NOT UNIX)
include(CPack)