summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/TDEMacros.cmake34
-rw-r--r--modules/template_dummy_cpp.cmake5
-rw-r--r--modules/template_export_library.cmake7
-rw-r--r--modules/template_libtool_file.cmake35
-rw-r--r--modules/template_tdeinit_executable.cmake2
-rw-r--r--modules/template_tdeinit_module.cmake3
6 files changed, 30 insertions, 56 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index 9ffcfa0..e45de66 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -20,6 +20,32 @@ include( CheckCXXCompilerFlag )
#################################################
#####
+##### initialization...
+
+if( NOT TDE_CMAKE_ROOT )
+ if( ${CMAKE_CURRENT_LIST_DIR} STREQUAL ${CMAKE_ROOT}/Modules )
+
+ # TDE CMake is installed in the system directory
+ set( TDE_CMAKE_ROOT ${CMAKE_ROOT}
+ CACHE FILEPATH "TDE CMake root" )
+ set( TDE_CMAKE_TEMPLATES ${TDE_CMAKE_ROOT}/Templates
+ CACHE FILEPATH "TDE CMake templates" )
+
+ else()
+
+ # TDE CMake is part of the source code
+ get_filename_component( TDE_CMAKE_ROOT ${CMAKE_CURRENT_LIST_DIR} PATH )
+ set( TDE_CMAKE_ROOT ${TDE_CMAKE_ROOT}
+ CACHE FILEPATH "TDE CMake root" )
+ set( TDE_CMAKE_TEMPLATES ${TDE_CMAKE_ROOT}/templates
+ CACHE FILEPATH "TDE CMake templates" )
+
+ endif()
+endif()
+
+
+#################################################
+#####
##### tde_message_fatal
macro( tde_message_fatal )
@@ -701,7 +727,7 @@ macro( tde_install_libtool_file _target _destination )
set( _libdir "${CMAKE_INSTALL_PREFIX}/${_destination}" )
endif( IS_ABSOLUTE ${_destination} )
- configure_file( ${CMAKE_SOURCE_DIR}/cmake/modules/template_libtool_file.cmake "${_laname}" @ONLY )
+ configure_file( ${TDE_CMAKE_TEMPLATES}/tde_libtool_file.cmake "${_laname}" @ONLY )
install( FILES "${CMAKE_CURRENT_BINARY_DIR}/${_laname}" DESTINATION ${_destination} )
@@ -1059,7 +1085,7 @@ macro( tde_add_library _arg_target )
unset( _version )
endif( )
- configure_file( ${CMAKE_SOURCE_DIR}/cmake/modules/template_export_library.cmake "${PROJECT_BINARY_DIR}/export-${_target}.cmake" @ONLY )
+ configure_file( ${TDE_CMAKE_TEMPLATES}/tde_export_library.cmake "${PROJECT_BINARY_DIR}/export-${_target}.cmake" @ONLY )
endif( )
# install target
@@ -1509,8 +1535,8 @@ endmacro( tde_add_check_executable )
macro( tde_add_tdeinit_executable _target )
- configure_file( ${CMAKE_SOURCE_DIR}/cmake/modules/template_tdeinit_executable.cmake ${_target}_tdeinit_executable.cpp COPYONLY )
- configure_file( ${CMAKE_SOURCE_DIR}/cmake/modules/template_tdeinit_module.cmake ${_target}_tdeinit_module.cpp COPYONLY )
+ configure_file( ${TDE_CMAKE_TEMPLATES}/tde_tdeinit_executable.cmake ${_target}_tdeinit_executable.cpp COPYONLY )
+ configure_file( ${TDE_CMAKE_TEMPLATES}/tde_tdeinit_module.cmake ${_target}_tdeinit_module.cpp COPYONLY )
unset( _sources )
unset( _runtime_destination )
diff --git a/modules/template_dummy_cpp.cmake b/modules/template_dummy_cpp.cmake
deleted file mode 100644
index 8e1f5ff..0000000
--- a/modules/template_dummy_cpp.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-#ifdef _AIX
- namespace {
- void *not_empty_file;
- }
-#endif
diff --git a/modules/template_export_library.cmake b/modules/template_export_library.cmake
deleted file mode 100644
index 4d6cb3f..0000000
--- a/modules/template_export_library.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-add_library( @_target@ @_type@ IMPORTED )
-
-set_target_properties( @_target@ PROPERTIES
- IMPORTED_LINK_INTERFACE_LIBRARIES "@_shared_libs@"
- IMPORTED_LOCATION "@_location@"
- IMPORTED_SONAME "@_soname@" )
-
diff --git a/modules/template_libtool_file.cmake b/modules/template_libtool_file.cmake
deleted file mode 100644
index fcd73d4..0000000
--- a/modules/template_libtool_file.cmake
+++ /dev/null
@@ -1,35 +0,0 @@
-# @_laname@ - a libtool library file
-# Generated by CMake - GNU libtool
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='@_library_name_2@'
-
-# Names of this library.
-library_names='@_library_name_1@ @_library_name_2@ @_library_name_3@'
-
-# The name of the static archive.
-old_library=''
-
-# Libraries that this one depends upon.
-dependency_libs=''
-
-# Version information for @_name@.
-current=@_version_current@
-age=@_version_age@
-revision=@_version_revision@
-
-# Is this an already installed library?
-installed=yes
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=@_shouldnotlink@
-
-# Files to dlopen/dlpreopen
-dlopen=''
-dlpreopen=''
-
-# Directory that this library needs to be installed in:
-libdir='@_libdir@'
diff --git a/modules/template_tdeinit_executable.cmake b/modules/template_tdeinit_executable.cmake
deleted file mode 100644
index 3d480c4..0000000
--- a/modules/template_tdeinit_executable.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-extern "C" int kdemain(int argc, char* argv[]);
-int main(int argc, char* argv[]) { return kdemain(argc,argv); }
diff --git a/modules/template_tdeinit_module.cmake b/modules/template_tdeinit_module.cmake
deleted file mode 100644
index efd89d8..0000000
--- a/modules/template_tdeinit_module.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
-#include <kdemacros.h>
-extern "C" int kdemain(int argc, char* argv[]);
-extern "C" KDE_EXPORT int tdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); }