aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-12-14 23:11:35 +0000
committerAlexander Neundorf <neundorf@kde.org>2008-12-14 23:11:35 +0000
commit728a5895ce2bd160b3a8748ee15711d942d62ebb (patch)
treef4783c340a4f48b09d9d6ff366d55b599e2a4ebf
parentd6452721669defdbf81eb43cdab8e08b4ef43ed7 (diff)
downloadextra-cmake-modules-728a5895ce2bd160b3a8748ee15711d942d62ebb.tar.gz
extra-cmake-modules-728a5895ce2bd160b3a8748ee15711d942d62ebb.tar.bz2
-rename the new kde4_write_basic_cmake_version_file() to macro_write_basic_cmake_version_file(), since
it is completely KDE-independent and can potentially be used in any other project remove the old macro, add the new renamed one, add it to the macro library, adjust kdepimlibs/CMakeLists.txt accordingly Alex svn path=/trunk/KDE/kdelibs/; revision=896999
-rw-r--r--modules/BasicFindPackageVersion.cmake.in (renamed from modules/kde4BasicFindPackageVersion.cmake.in)4
-rw-r--r--modules/CMakeLists.txt4
-rw-r--r--modules/FindKDE4Internal.cmake8
-rw-r--r--modules/KDE4Macros.cmake8
-rw-r--r--modules/MacroLibrary.cmake1
-rw-r--r--modules/MacroWriteBasicCMakeVersionFile.cmake22
6 files changed, 27 insertions, 20 deletions
diff --git a/modules/kde4BasicFindPackageVersion.cmake.in b/modules/BasicFindPackageVersion.cmake.in
index ba4cb1eb..ae5d3125 100644
--- a/modules/kde4BasicFindPackageVersion.cmake.in
+++ b/modules/BasicFindPackageVersion.cmake.in
@@ -1,6 +1,6 @@
# This is a very basic file for the new style find_package() search mode,
-# i.e. Config-mode. It is used by KDE4_WRITE_BASIC_CMAKE_VERSION_FILE() from
-# KDE4Macros.cmake.
+# i.e. Config-mode. It is used by MACRO_WRITE_BASIC_CMAKE_VERSION_FILE() from
+# MacroWriteBasicCMakeVersionFile.cmake.
# In this mode find_package() searches for a <package>Config.cmake
# file and an associated <package>Version.cmake file, which it loads to check
# the version number.
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index 35526b69..675659c4 100644
--- a/modules/CMakeLists.txt
+++ b/modules/CMakeLists.txt
@@ -1,4 +1,4 @@
-## install the cmake files
+# install the cmake files
file(GLOB cmakeFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.cmake")
@@ -9,7 +9,7 @@ install( FILES cmake-modules-styleguide.txt
kde4init_win32lib_dummy.cpp.in
kde4_cmake_uninstall.cmake.in
kde4automoc.files.in
- kde4BasicFindPackageVersion.cmake.in
+ BasicFindPackageVersion.cmake.in
FindLibPython.py
FindPyKDE4.py
FindPyQt.py
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index ba03f65f..6d839124 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -134,14 +134,6 @@
# Use this to add widget description files for the makekdewidgets code generator
# for Qt Designer plugins.
#
-# KDE4_WRITE_BASIC_CMAKE_VERSION_FILE( _filename _major _minor _patch)
-# Writes a file for use as <package>ConfigVersion.cmake file to <_filename>.
-# See the documentation of FIND_PACKAGE() for details on this.
-# _filename is the output filename, it should be in the build tree.
-# _major is the major version number of the project to be installed
-# _minor is the minor version number of the project to be installed
-# _patch is the patch version number of the project to be installed
-#
# KDE4_CREATE_FINAL_FILES (filename_CXX filename_C file1 ... fileN)
# This macro is intended mainly for internal uses.
# It is used for enable-final. It will generate two source files,
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index 37195e87..f0bd9c8e 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -1134,14 +1134,6 @@ macro (KDE4_ADD_APP_ICON appsources pattern)
endmacro (KDE4_ADD_APP_ICON)
-function(KDE4_WRITE_BASIC_CMAKE_VERSION_FILE _filename _major _minor _patch)
- set(PROJECT_VERSION_MAJOR ${_major})
- set(PROJECT_VERSION_MINOR ${_minor})
- set(PROJECT_VERSION_PATCH ${_patch})
- configure_file(${KDE4_MODULE_DIR}/kde4BasicFindPackageVersion.cmake.in "${_filename}" @ONLY)
-endfunction(KDE4_WRITE_BASIC_CMAKE_VERSION_FILE _major _minor _patch)
-
-
macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename)
message(FATAL_ERROR "_KDE4_EXPORT_LIBRARY_DEPENDENCIES() was an internal macro and has been removed again. Just remove the code which calls it, there is no substitute.")
endmacro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES)
diff --git a/modules/MacroLibrary.cmake b/modules/MacroLibrary.cmake
index 5e482f92..a467d840 100644
--- a/modules/MacroLibrary.cmake
+++ b/modules/MacroLibrary.cmake
@@ -16,3 +16,4 @@ INCLUDE(MacroEnsureOutOfSourceBuild)
INCLUDE(MacroBoolTo01)
INCLUDE(MacroPushRequiredVars)
INCLUDE(MacroLogFeature)
+INCLUDE(MacroWriteBasicCMakeVersionFile)
diff --git a/modules/MacroWriteBasicCMakeVersionFile.cmake b/modules/MacroWriteBasicCMakeVersionFile.cmake
new file mode 100644
index 00000000..6f9e4189
--- /dev/null
+++ b/modules/MacroWriteBasicCMakeVersionFile.cmake
@@ -0,0 +1,22 @@
+# MACRO_WRITE_BASIC_CMAKE_VERSION_FILE( _filename _major _minor _patch)
+# Writes a file for use as <package>ConfigVersion.cmake file to <_filename>.
+# See the documentation of FIND_PACKAGE() for details on this.
+# _filename is the output filename, it should be in the build tree.
+# _major is the major version number of the project to be installed
+# _minor is the minor version number of the project to be installed
+# _patch is the patch version number of the project to be installed
+#
+
+# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+get_filename_component(_currentListFileDir ${CMAKE_CURRENT_LIST_FILE} PATH)
+
+function(MACRO_WRITE_BASIC_CMAKE_VERSION_FILE _filename _major _minor _patch)
+ set(PROJECT_VERSION_MAJOR ${_major})
+ set(PROJECT_VERSION_MINOR ${_minor})
+ set(PROJECT_VERSION_PATCH ${_patch})
+ configure_file(${_currentListFileDir}/BasicFindPackageVersion.cmake.in "${_filename}" @ONLY)
+endfunction(MACRO_WRITE_BASIC_CMAKE_VERSION_FILE _major _minor _patch)