diff --git CMakeLists.txt CMakeLists.txt
index 4e735a1..55f78bc 100644
|
|
CMAKE_MINIMUM_REQUIRED( VERSION 2.6.0 ) |
38 | 38 | SET( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake" ) |
39 | 39 | SET( CMAKE_AUTOMOC ON ) |
40 | 40 | |
41 | | # try Qt5 first, and prefer that if found |
42 | | find_package(Qt5Core QUIET) |
| 41 | if(NOT WITH_QT4) |
| 42 | # try Qt5 first, and prefer that if found |
| 43 | find_package(Qt5Core QUIET) |
| 44 | endif() |
43 | 45 | IF (Qt5Core_FOUND) |
44 | 46 | find_package(Qt5Widgets REQUIRED) |
45 | 47 | find_package(Qt5Xml REQUIRED) |
… |
… |
IF (Qt5Core_FOUND) |
61 | 63 | SET(QT_PLATFORM_SPECIFIC_LIBRARIES) |
62 | 64 | ENDIF() |
63 | 65 | |
64 | | IF(APPLE) |
| 66 | # IF(APPLE) |
65 | 67 | find_package(Qt5MacExtras REQUIRED) |
66 | 68 | include_directories(${Qt5MacExtras_INCLUDE_DIRS}) |
67 | 69 | set(QT_PLATFORM_SPECIFIC_LIBRARIES ${Qt5MacExtras_LIBRARIES}) |
68 | | ENDIF() |
| 70 | # ENDIF() |
69 | 71 | |
70 | 72 | IF(NOT APPLE) |
71 | 73 | find_package(Qt5DBus) |
… |
… |
ELSE() |
124 | 126 | |
125 | 127 | SET(CHARM_MAC_HIGHRES_SUPPORT_ENABLED OFF) |
126 | 128 | |
127 | | IF(UNIX AND NOT APPLE) |
| 129 | IF(UNIX) # AND NOT APPLE) |
128 | 130 | find_package(Qt4 COMPONENTS QtDBus) |
129 | 131 | IF (QT_QTDBUS_FOUND) |
130 | 132 | set(HAVE_DBUS ON) |
… |
… |
IF( UNIX AND NOT APPLE ) |
197 | 199 | SET( DOC_INSTALL_DIR share/doc/${Charm_EXECUTABLE} ) |
198 | 200 | ELSE() |
199 | 201 | set( Charm_EXECUTABLE Charm ) |
200 | | SET( BIN_INSTALL_DIR . ) |
201 | | SET( DOC_INSTALL_DIR . ) |
| 202 | if(NOT BIN_INSTALL_DIR) |
| 203 | SET( BIN_INSTALL_DIR . ) |
| 204 | endif() |
| 205 | SET( DOC_INSTALL_DIR share/doc/${Charm_EXECUTABLE} ) |
202 | 206 | ENDIF() |
203 | 207 | SET( ICONS_DIR "${CMAKE_SOURCE_DIR}/Charm/Icons" ) |
204 | 208 | |
… |
… |
CONFIGURE_FILE( CharmCMake.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/CharmCMake.h ) |
223 | 227 | |
224 | 228 | SET( LICENSE_FILE "License.txt" ) |
225 | 229 | SET( README_FILE "ReadMe.txt" ) |
226 | | IF( NOT APPLE ) |
| 230 | #IF( NOT APPLE ) |
227 | 231 | INSTALL( FILES "${LICENSE_FILE}" "${README_FILE}" DESTINATION ${DOC_INSTALL_DIR} ) |
228 | | ENDIF() |
| 232 | #ENDIF() |
229 | 233 | |
230 | 234 | # Only support CPack packaging on newer versions of CMake. |
231 | 235 | IF( NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.4" ) |
… |
… |
IF( NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.4" ) |
252 | 256 | "${README_FILE}" "Readme" |
253 | 257 | ) |
254 | 258 | SET( CPACK_NSIS_MUI_FINISHPAGE_RUN "${CPACK_NSIS_INSTALLED_ICON_NAME}" ) |
255 | | ELSEIF( APPLE ) |
| 259 | ELSEIF( APPLENATIVE ) |
256 | 260 | SET( CPACK_GENERATOR "DragNDrop" ) |
257 | 261 | SET( CPACK_DMG_FORMAT "UDBZ" ) |
258 | 262 | SET( CPACK_DMG_VOLUME_NAME "Charm" ) |
diff --git Charm/CMakeLists.txt Charm/CMakeLists.txt
index e11bae3..a9faff9 100644
|
|
IF( WIN32 ) |
180 | 180 | ENDIF() |
181 | 181 | MESSAGE( STATUS "Charm will be installed to ${CMAKE_INSTALL_PREFIX}" ) |
182 | 182 | |
183 | | IF( UNIX AND NOT APPLE ) |
| 183 | IF( UNIX) # AND NOT APPLE ) |
184 | 184 | SET( XDG_APPS_INSTALL_DIR share/applications ) |
185 | 185 | INSTALL( FILES charmtimetracker.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) |
186 | 186 | INSTALL( FILES Icons/Charm-128x128.png DESTINATION share/icons/hicolor/128x128/apps ) |
… |
… |
IF( NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.4" ) |
217 | 217 | DESTINATION ${BIN_INSTALL_DIR} ) |
218 | 218 | ENDIF() |
219 | 219 | |
220 | | IF( APPLE OR WIN32 ) |
221 | | INCLUDE( DeployQt4 ) |
222 | | INSTALL_QT4_EXECUTABLE( "${EXECUTABLE}" "qsqlite" ) |
223 | | ENDIF() |
| 220 | # IF( APPLE OR WIN32 ) |
| 221 | # INCLUDE( DeployQt4 ) |
| 222 | # INSTALL_QT4_EXECUTABLE( "${EXECUTABLE}" "qsqlite" ) |
| 223 | # ENDIF() |
224 | 224 | ENDIF() |