[Kde-bindings] KDE/kdebindings
Cyrille Berger
cyb at lepi.org
Sun Jul 13 16:04:43 UTC 2008
SVN commit 831910 by berger:
* fix cmake trying to use FindKDevPlatform.cmake
CCMAIL: kde-bindings at kde.org
M +16 -4 CMakeLists.txt
--- trunk/KDE/kdebindings/CMakeLists.txt #831909:831910
@@ -7,9 +7,21 @@
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)
-include(MacroOptionalDependPackage)
include(MacroOptionalAddSubdirectory)
+# the MACRO_OPTIONAL_DEPEND_PACKAGE from KDE4 is broken
+MACRO (OUR_MACRO_OPTIONAL_DEPEND_PACKAGE _name _module_needed)
+ set(_packagename Find${_name}.cmake)
+ find_file(${_name}_PACKAGE_DEPEND_FOUND ${_packagename} PATHS ${CMAKE_MODULE_PATH} )
+ if(NOT ${_name}_PACKAGE_DEPEND_FOUND)
+ MESSAGE(STATUS "cmake package ${_packagename} was not found. The package ${_module_needed} is needed to compile all part of this program.")
+ set(DEPEND_PACKAGE_${_name} FALSE)
+ else(NOT ${_name}_PACKAGE_DEPEND_FOUND)
+ set(DEPEND_PACKAGE_${_name} TRUE)
+ endif(NOT ${_name}_PACKAGE_DEPEND_FOUND)
+ENDMACRO (OUR_MACRO_OPTIONAL_DEPEND_PACKAGE)
+
+
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DQT3_SUPPORT)
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
@@ -23,13 +35,13 @@
# Look for Okular
set( OKULAR_FOUND "no" )
-macro_optional_depend_package(Okular "Okular")
+our_macro_optional_depend_package(Okular "Okular")
if(DEPEND_PACKAGE_Okular)
macro_optional_find_package(Okular)
endif(DEPEND_PACKAGE_Okular)
# Look for Akonadi
-macro_optional_depend_package(Akonadi "Akonadi")
+our_macro_optional_depend_package(Akonadi "Akonadi")
if(DEPEND_PACKAGE_Akonadi)
macro_optional_find_package(Akonadi)
endif(DEPEND_PACKAGE_Akonadi)
@@ -40,7 +52,7 @@
# Look for KDevelop
set( KDEVPLATFORM_FOUND "no" )
-macro_optional_depend_package(KDevPlatform "KDevPlatform")
+our_macro_optional_depend_package(KDevPlatform "KDevPlatform")
if(DEPEND_PACKAGE_KDevPlatform)
macro_optional_find_package(KDevPlatform)
endif(DEPEND_PACKAGE_KDevPlatform)
More information about the Kde-bindings
mailing list