|
Lines 3-9
Link Here
|
| 3 |
|
3 |
|
| 4 |
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") |
4 |
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") |
| 5 |
set(CPACK_GENERATOR "DEB;RPM;TGZ") |
5 |
set(CPACK_GENERATOR "DEB;RPM;TGZ") |
| 6 |
set(DEBIAN_PACKAGE_DESCRIPTION "QtCurve for Qt3/KDE3") |
6 |
set(DEBIAN_PACKAGE_DESCRIPTION "QtCurve for Qt3/TDE") |
| 7 |
set(DEBIAN_PACKAGE_SECTION "kde") |
7 |
set(DEBIAN_PACKAGE_SECTION "kde") |
| 8 |
set(CPACK_SOURCE_GENERATOR "TBZ2") |
8 |
set(CPACK_SOURCE_GENERATOR "TBZ2") |
| 9 |
set(CPACK_PACKAGE_VERSION_MAJOR "1") |
9 |
set(CPACK_PACKAGE_VERSION_MAJOR "1") |
|
Lines 16-54
Link Here
|
| 16 |
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${QTCURVE_VERSION_FULL}") |
16 |
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${QTCURVE_VERSION_FULL}") |
| 17 |
include(CPack) |
17 |
include(CPack) |
| 18 |
|
18 |
|
|
|
19 |
##### include essential cmake modules ########### |
| 20 |
|
| 21 |
include( FindPkgConfig ) |
| 22 |
include( CheckIncludeFile ) |
| 23 |
include( CheckSymbolExists ) |
| 24 |
include( CheckFunctionExists ) |
| 25 |
include( CheckCSourceCompiles ) |
| 26 |
include( CheckCXXSourceCompiles ) |
| 27 |
include( CheckTypeSize ) |
| 28 |
include( CheckCSourceRuns ) |
| 29 |
include( CheckLibraryExists ) |
| 30 |
|
| 31 |
##### include our cmake modules ################# |
| 32 |
|
| 33 |
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) |
| 34 |
include( TDEMacros ) |
| 35 |
include( TDESetupPaths ) |
| 36 |
|
| 37 |
##### setup and find essential stuff ############ |
| 38 |
|
| 39 |
tde_setup_paths( ) |
| 40 |
find_package( TQt ) |
| 41 |
|
| 42 |
|
| 19 |
if(COMMAND cmake_policy) |
43 |
if(COMMAND cmake_policy) |
| 20 |
cmake_policy(SET CMP0003 NEW) |
44 |
cmake_policy(SET CMP0003 NEW) |
| 21 |
endif(COMMAND cmake_policy) |
45 |
endif(COMMAND cmake_policy) |
| 22 |
|
46 |
|
| 23 |
if (QTC_BUILD_CONFIG_MODULE) |
47 |
if (QTC_BUILD_CONFIG_MODULE) |
| 24 |
if (NOT QTC_QT_ONLY) |
48 |
if (NOT QTC_QT_ONLY) |
| 25 |
find_package(KDE3) |
49 |
find_package(TDE) |
| 26 |
if (NOT KDE3_FOUND) |
50 |
if (NOT TDE_VERSION) |
| 27 |
set(QTC_QT_ONLY true) |
51 |
set(QTC_QT_ONLY true) |
| 28 |
message("INFO: KDE3 not found! Compiling for Qt only! (Not building the config module)") |
52 |
message("INFO: Trinity not found! Compiling for Qt only! (Not building the config module)") |
| 29 |
endif (NOT KDE3_FOUND) |
53 |
endif (NOT TDE_VERSION) |
| 30 |
endif (NOT QTC_QT_ONLY) |
54 |
endif (NOT QTC_QT_ONLY) |
| 31 |
else (QTC_BUILD_CONFIG_MODULE) |
55 |
else (QTC_BUILD_CONFIG_MODULE) |
| 32 |
set(QTC_QT_ONLY true) |
56 |
set(QTC_QT_ONLY true) |
| 33 |
endif (QTC_BUILD_CONFIG_MODULE) |
57 |
endif (QTC_BUILD_CONFIG_MODULE) |
| 34 |
|
58 |
|
| 35 |
if (NOT QTC_QT_ONLY) |
59 |
if (NOT QTC_QT_ONLY) |
| 36 |
include(KDE3Macros) |
60 |
include(TDEMacros) |
| 37 |
else (NOT QTC_QT_ONLY) |
61 |
else (NOT QTC_QT_ONLY) |
| 38 |
if (NOT KDE3PREFIX) |
62 |
if (NOT TDEPREFIX) |
| 39 |
SET(KDE3PREFIX "/opt/trinity") |
63 |
SET(TDEPREFIX "/opt/trinity") |
| 40 |
endif (NOT KDE3PREFIX) |
64 |
endif (NOT TDEPREFIX) |
|
|
65 |
endif (NOT QTC_QT_ONLY) |
| 41 |
|
66 |
|
| 42 |
set(QT_MT_REQUIRED TRUE) |
67 |
set(QT_MT_REQUIRED TRUE) |
| 43 |
find_package(Qt3 REQUIRED) |
68 |
find_package(Qt3 REQUIRED) |
| 44 |
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ) |
69 |
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ) |
| 45 |
include(QtCurveQt3) |
70 |
include(QtCurveQt3) |
|
|
71 |
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) |
| 46 |
if (QT_PLUGINS_DIR MATCHES NOTFOUND) |
72 |
if (QT_PLUGINS_DIR MATCHES NOTFOUND) |
| 47 |
MESSAGE(STATUS_ERROR "Qt3 package not found--assuming TQt4") |
73 |
MESSAGE(STATUS_ERROR "Qt3 package not found--assuming TQt4") |
| 48 |
SET(QT_INCLUDE_DIR "/usr/include/qt4") |
74 |
SET(QT_INCLUDE_DIR "/usr/include/qt4") |
| 49 |
SET(QT_PLUGINS_DIR "${KDE3PREFIX}/lib${LIB_SUFFIX}/trinity/plugins") |
75 |
SET(QT_PLUGINS_DIR "${TDEPREFIX}/lib${LIB_SUFFIX}/trinity/plugins") |
| 50 |
endif (QT_PLUGINS_DIR MATCHES NOTFOUND) |
76 |
endif (QT_PLUGINS_DIR MATCHES NOTFOUND) |
| 51 |
endif (NOT QTC_QT_ONLY) |
|
|
| 52 |
|
77 |
|
| 53 |
#if (NOT QTC_QT_ONLY) |
78 |
#if (NOT QTC_QT_ONLY) |
| 54 |
exec_program(kde-config |
79 |
exec_program(kde-config |
|
Lines 56-73
Link Here
|
| 56 |
OUTPUT_VARIABLE CMAKE_INSTALL_PREFIX) |
81 |
OUTPUT_VARIABLE CMAKE_INSTALL_PREFIX) |
| 57 |
#endif (NOT QTC_QT_ONLY) |
82 |
#endif (NOT QTC_QT_ONLY) |
| 58 |
|
83 |
|
| 59 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT") |
84 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/opt/trinity/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT") |
| 60 |
|
85 |
|
| 61 |
# NASTY HACK TO FORCE COMPILATION |
86 |
# NASTY HACK TO FORCE COMPILATION |
| 62 |
# REMOVE WHEN FIXED |
87 |
# REMOVE WHEN FIXED |
| 63 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/opt/trinity/include") |
88 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/opt/trinity/include") |
| 64 |
|
89 |
|
| 65 |
SET(QT_UIC_EXECUTABLE "/usr/bin/uic-tqt" CACHE FILEPATH "") |
|
|
| 66 |
SET(QT_MOC_EXECUTABLE "/usr/bin/tmoc" CACHE FILEPATH "") |
| 67 |
|
| 68 |
exec_program(kde-config |
90 |
exec_program(kde-config |
| 69 |
ARGS --install locale --expandvars |
91 |
ARGS --install locale --expandvars |
| 70 |
OUTPUT_VARIABLE KDE3_LOCALE_PREFIX) |
92 |
OUTPUT_VARIABLE TDE_LOCALE_PREFIX) |
| 71 |
|
93 |
|
| 72 |
file(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS) |
94 |
file(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS) |
| 73 |
|
95 |
|
|
Lines 87-117
Link Here
|
| 87 |
endif(KDE4_KDECONFIG_EXECUTABLE) |
109 |
endif(KDE4_KDECONFIG_EXECUTABLE) |
| 88 |
|
110 |
|
| 89 |
if(NOT KDE4PREFIX) |
111 |
if(NOT KDE4PREFIX) |
| 90 |
set(KDE4PREFIX ${KDE3PREFIX}) |
112 |
set(KDE4PREFIX ${TDEPREFIX}) |
| 91 |
endif(NOT KDE4PREFIX) |
113 |
endif(NOT KDE4PREFIX) |
| 92 |
|
114 |
|
| 93 |
configure_file (config.h.cmake ${CMAKE_BINARY_DIR}/config.h) |
115 |
configure_file (config.h.cmake ${CMAKE_BINARY_DIR}/config.h) |
| 94 |
#if (NOT QTC_QT_ONLY) |
116 |
#if (NOT QTC_QT_ONLY) |
| 95 |
add_definitions(${QT_DEFINITIONS} ${KDE3_DEFINITIONS}) |
117 |
add_definitions(${QT_DEFINITIONS} ${TDE_DEFINITIONS}) |
| 96 |
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDES}) |
118 |
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${TDE_INCLUDES}) |
| 97 |
#else (NOT QTC_QT_ONLY) |
119 |
#else (NOT QTC_QT_ONLY) |
| 98 |
# add_definitions(${QT_DEFINITIONS}) |
120 |
# add_definitions(${QT_DEFINITIONS}) |
| 99 |
# include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) |
121 |
# include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) |
| 100 |
#endif (NOT QTC_QT_ONLY) |
122 |
#endif (NOT QTC_QT_ONLY) |
| 101 |
|
123 |
|
| 102 |
set(DATA_INSTALL_DIR ${KDE3PREFIX}/share/apps) |
124 |
set(DATA_INSTALL_DIR ${TDEPREFIX}/share/apps) |
| 103 |
|
125 |
|
| 104 |
if(QTC_DEFAULT_TO_KDE3) |
126 |
if(QTC_DEFAULT_TO_TDE) |
| 105 |
message("INFO: Defaulting to reading KDE3 settings if KDE_SESSION_VERSION is not set") |
127 |
message("INFO: Defaulting to reading TDE settings if KDE_SESSION_VERSION is not set") |
| 106 |
else(QTC_DEFAULT_TO_KDE3) |
128 |
else(QTC_DEFAULT_TO_TDE) |
| 107 |
message("INFO: Defaulting to reading KDE4 settings if KDE_SESSION_VERSION is not set") |
129 |
message("INFO: Defaulting to reading KDE4 settings if KDE_SESSION_VERSION is not set") |
| 108 |
endif(QTC_DEFAULT_TO_KDE3) |
130 |
endif(QTC_DEFAULT_TO_TDE) |
| 109 |
|
131 |
|
| 110 |
add_subdirectory(style) |
132 |
add_subdirectory(style) |
| 111 |
#if (NOT QTC_QT_ONLY) |
133 |
#if (NOT QTC_QT_ONLY) |
| 112 |
if (QTC_BUILD_CONFIG_MODULE) |
134 |
if (QTC_BUILD_CONFIG_MODULE) |
| 113 |
message("**************************************************************\n" |
135 |
message("**************************************************************\n" |
| 114 |
"Warning: The KDE3 config module is deprecated, and is no longer\n" |
136 |
"Warning: The TDE config module is deprecated, and is no longer\n" |
| 115 |
" actively maintained. This module NO LONGER COMPILES!\n" |
137 |
" actively maintained. This module NO LONGER COMPILES!\n" |
| 116 |
" It is recommended to use the KDE4 version instead.\n" |
138 |
" It is recommended to use the KDE4 version instead.\n" |
| 117 |
"**************************************************************\n") |
139 |
"**************************************************************\n") |