blob: 14cc2a7682a34ac1da858e62f0be16b0587b46fb (
plain) (
blame)
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
|
### CONFIGURE ##################################################################
set(EMUCHOOSER_PLUGIN_PATH "/opt/openslx/plugin-repo/emuchooser")
set(EMUCHOOSER_BIN_PATH "/var/opt/openslx/bin")
set(EMUCHOOSER_ETC_BASE_PATH "/etc/emuchooser")
set(EMUCHOOSER_VMPATH "/var/lib/virt")
set(EMUCHOOSER_THEME_BASE "/usr/local/share/emuchooser/themes")
set(EMUCHOOSER_X_SESSIONS_PATH "/usr/share/xsessions")
set(EMUCHOOSER_DEFAULT_WIDTH "500")
set(EMUCHOOSER_DEFAULT_HEIGHT "580")
configure_file("Version.h.in" "Version.h")
configure_file("Config.h.in" "Config.h")
### INCLUDES ###################################################################
set(QT_USE_QTXML TRUE)
set(QT_USE_QTWEBKIT TRUE)
include(${QT_USE_FILE})
find_package(PkgConfig)
pkg_check_modules(LCHOOSER libChooser)
include_directories("/usr/include" "${CMAKE_CURRENT_BINARY_DIR}" "${LCHOOSER_INCLUDE_DIRS}")
set(EMUCHOOSER_CONFIG_HEADERS "Version.h" "Config.h")
set(EMUCHOOSER_HEADERS "Globals.h")
set(EMUCHOOSER_SOURCES "main.cpp" "Globals.cpp")
set(EMUCHOOSER_MOC_HEADERS "Dialog.h" "JavaScriptInterface.h")
set(EMUCHOOSER_MOC_SOURCES "Dialog.cpp" "JavaScriptInterface.cpp")
file(GLOB_RECURSE EMUCHOOSER_RESOURCES "*.qrc")
QT4_WRAP_CPP(EMUCHOOSER_MOC_SOURCES ${EMUCHOOSER_MOC_HEADERS})
QT4_ADD_RESOURCES(EMUCHOOSER_RC_SOURCES ${EMUCHOOSER_RESOURCES})
### BUILD ######################################################################
add_executable (emuchooser ${EMUCHOOSER_SOURCES} ${EMUCHOOSER_MOC_SOURCES} ${EMUCHOOSER_RC_SOURCES} ${EMUCHOOSER_HEADERS} ${EMUCHOOSER_MOC_HEADERS})
target_link_libraries(emuchooser ${QT_LIBRARIES} ${LCHOOSER_LDFLAGS} )
### INSTALL ####################################################################
INSTALL(TARGETS emuchooser RUNTIME DESTINATION bin)
### BUILD PACKAGE ##############################################################
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Sebastian Schmelzer <ssc@xss.nu>") #required
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "emuchooser")
set(CPACK_PACKAGE_DESCRIPTION "emuchooser")
set(CPACK_PACKAGE_VERSION "${emuchooser_VERSION_MAJOR}.${emuchooser_VERSION_MINOR}.${emuchooser_VERSION_PATCH}")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqtcore4")
set(CPACK_DEBIAN_PACKAGE_SECTION "misc")
set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
set(CPACK_PACKAGE_NAME "emuchooser")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_PACKAGE_FILE_NAME "emuchooser_${CPACK_PACKAGE_VERSION}_ubuntu_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "emuchooser_${CPACK_PACKAGE_VERSION}")
INCLUDE(CPack)
|