summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt82
1 files changed, 71 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 803ff67..ad2c3ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,24 +6,53 @@ set(CPACK_GENERATOR "DEB;RPM;TGZ")
set(DEBIAN_PACKAGE_DESCRIPTION "QtCurve for Qt3/KDE3")
set(DEBIAN_PACKAGE_SECTION "kde")
set(CPACK_SOURCE_GENERATOR "TBZ2")
-set(CPACK_PACKAGE_VERSION_MAJOR "0")
-set(CPACK_PACKAGE_VERSION_MINOR "55")
+set(CPACK_PACKAGE_VERSION_MAJOR "1")
+set(CPACK_PACKAGE_VERSION_MINOR "6")
set(CPACK_PACKAGE_VERSION_PATCH "2")
-set(CPACK_PACKAGE_CONTACT "Craig Drummond <[email protected]>")
+set(CPACK_PACKAGE_CONTACT "Craig Drummond <[email protected]>")
set(QTCURVE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
set(QTCURVE_VERSION_FULL "${QTCURVE_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${QTCURVE_VERSION_FULL}")
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${QTCURVE_VERSION_FULL}")
include(CPack)
-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
+if(COMMAND cmake_policy)
+ cmake_policy(SET CMP0003 NEW)
+endif(COMMAND cmake_policy)
-find_package(KDE3 REQUIRED)
-include(KDE3Macros)
+if (QTC_BUILD_CONFIG_MODULE)
+ if (NOT QTC_QT_ONLY)
+ find_package(KDE3)
+ if (NOT KDE3_FOUND)
+ set(QTC_QT_ONLY true)
+ message("INFO: KDE3 not found! Compiling for Qt only! (Not building the config module)")
+ endif (NOT KDE3_FOUND)
+ endif (NOT QTC_QT_ONLY)
+else (QTC_BUILD_CONFIG_MODULE)
+ set(QTC_QT_ONLY true)
+endif (QTC_BUILD_CONFIG_MODULE)
+if (NOT QTC_QT_ONLY)
+ include(KDE3Macros)
+else (NOT QTC_QT_ONLY)
+ set(QT_MT_REQUIRED TRUE)
+ find_package(Qt3 REQUIRED)
+ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake )
+ include(QtCurveQt3)
+ if (QT_PLUGINS_DIR MATCHES NOTFOUND)
+ message(SEND_ERROR "ERROR: Failed to detemine Qt3 plugins folder. Please pass -DQT_PLUGINS_DIR=<folder> to cmake")
+ endif (QT_PLUGINS_DIR MATCHES NOTFOUND)
+endif (NOT QTC_QT_ONLY)
+
+if (NOT QTC_QT_ONLY)
exec_program(kde-config
- ARGS --prefix
+ ARGS --prefix --expandvars
OUTPUT_VARIABLE CMAKE_INSTALL_PREFIX)
+endif (NOT QTC_QT_ONLY)
+
+exec_program(kde-config
+ ARGS --install locale --expandvars
+ OUTPUT_VARIABLE KDE3_LOCALE_PREFIX)
file(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
@@ -47,11 +76,42 @@ if(NOT KDE4PREFIX)
endif(NOT KDE4PREFIX)
configure_file (config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
-add_definitions(${QT_DEFINITIONS} ${KDE3_DEFINITIONS})
-include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDES})
+if (NOT QTC_QT_ONLY)
+ add_definitions(${QT_DEFINITIONS} ${KDE3_DEFINITIONS})
+ include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE3_INCLUDES})
+else (NOT QTC_QT_ONLY)
+ add_definitions(${QT_DEFINITIONS})
+ include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
+endif (NOT QTC_QT_ONLY)
set(DATA_INSTALL_DIR ${KDE3PREFIX}/share/apps)
+
+if(QTC_DEFAULT_TO_KDE3)
+ message("INFO: Defaulting to reading KDE3 settings if KDE_SESSION_VERSION is not set")
+else(QTC_DEFAULT_TO_KDE3)
+ message("INFO: Defaulting to reading KDE4 settings if KDE_SESSION_VERSION is not set")
+endif(QTC_DEFAULT_TO_KDE3)
+
add_subdirectory(style)
-add_subdirectory(config)
-add_subdirectory(themes)
+if (NOT QTC_QT_ONLY)
+ if (QTC_BUILD_CONFIG_MODULE)
+ message("**************************************************************\n"
+ "Warning: The KDE3 config module is deprecated, and is no longer\n"
+ " actively maintained. This module NO LONGER COMPILES!\n"
+ " It is recommended to use the KDE4 version instead.\n"
+ "**************************************************************\n")
+ add_subdirectory(config)
+ add_subdirectory(po)
+ endif (QTC_BUILD_CONFIG_MODULE)
+ add_subdirectory(themes)
+ add_subdirectory(colors)
+endif (NOT QTC_QT_ONLY)
+if (QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT)
+ message("**************************************************************\n"
+ "Warning: You have enabled support for the 'fix parentless dialogs'\n"
+ " option. This is known to BREAK some applications. Please\n"
+ " DO NOT report errors to application authors when you have\n"
+ " this enabled. Please reconsider DISABLING this option.\n"
+ "**************************************************************\n")
+endif (QTC_ENABLE_PARENTLESS_DIALOG_FIX_SUPPORT)