|
From: <gb...@us...> - 2009-10-20 23:53:05
|
Revision: 446
http://gearbox.svn.sourceforge.net/gearbox/?rev=446&view=rev
Author: gbiggs
Date: 2009-10-20 23:52:58 +0000 (Tue, 20 Oct 2009)
Log Message:
-----------
Moved CMake scripts to ${PREFIX}/share/cmake/Modules
Modified Paths:
--------------
gearbox/trunk/cmake/CMakeLists.txt
gearbox/trunk/cmake/TargetUtils.cmake
Modified: gearbox/trunk/cmake/CMakeLists.txt
===================================================================
--- gearbox/trunk/cmake/CMakeLists.txt 2009-10-20 23:06:11 UTC (rev 445)
+++ gearbox/trunk/cmake/CMakeLists.txt 2009-10-20 23:52:58 UTC (rev 446)
@@ -2,4 +2,4 @@
# Install all .cmake files, so other projects can use them.
#
file( GLOB scripts *.cmake )
-GBX_ADD_SHARED_FILES( cmake ${scripts} )
+GBX_ADD_CMAKE_SCRIPTS( ${scripts} )
Modified: gearbox/trunk/cmake/TargetUtils.cmake
===================================================================
--- gearbox/trunk/cmake/TargetUtils.cmake 2009-10-20 23:06:11 UTC (rev 445)
+++ gearbox/trunk/cmake/TargetUtils.cmake 2009-10-20 23:52:58 UTC (rev 446)
@@ -17,6 +17,12 @@
mark_as_advanced( GBX_INSTALL_SHARED_FILES )
#
+# Default preference for installing CMake scripts.
+#
+set( GBX_INSTALL_CMAKE_SCRIPTS TRUE CACHE BOOLEAN "Do you want to install CMake scripts?" )
+mark_as_advanced( GBX_INSTALL_CMAKE_SCRIPTS )
+
+#
# Default preference for installing examples.
#
set( GBX_INSTALL_EXAMPLES TRUE CACHE BOOLEAN "Do you want to install example files?" )
@@ -111,6 +117,7 @@
install( FILES ${ARGN} DESTINATION include/${PROJECT_NAME}/${install_subdir} )
endif()
endmacro( GBX_ADD_HEADERS install_subdir )
+
#
# GBX_ADD_SHARED_FILES( install_subdir FILE0 [FILE1 FILE2 ...] )
#
@@ -124,6 +131,18 @@
endmacro( GBX_ADD_SHARED_FILES install_subdir )
#
+# GBX_ADD_CMAKE_SCRIPTS( FILE0 [FILE1 FILE2 ...] )
+#
+# Specialization of install(FILES ...) to install CMake scripts.
+# All files are installed into PREFIX/share/cmake/Modules directory.
+#
+macro( GBX_ADD_CMAKE_SCRIPTS )
+ if( GBX_INSTALL_CMAKE_SCRIPTS )
+ install( FILES ${ARGN} DESTINATION share/cmake/Modules )
+ endif()
+endmacro( GBX_ADD_CMAKE_SCRIPTS )
+
+#
# GBX_ADD_EXAMPLE( install_subdir makefile.in makefile.out [FILE0 FILE1 FILE2 ...] )
#
# Specialisation of install(FILES ...) to install examples.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|