From: <ai...@us...> - 2009-05-11 21:39:51
|
Revision: 9966 http://plplot.svn.sourceforge.net/plplot/?rev=9966&view=rev Author: airwin Date: 2009-05-11 21:39:43 +0000 (Mon, 11 May 2009) Log Message: ----------- Export core library (nistcd, csirocsa, csironn, qsastime, plplotd) linking information using the INSTALL(EXPORT ....) command signature and use that exported information to build the installed C examples with cmake as a proof of concept of the idea. Modified Paths: -------------- trunk/examples/CMakeLists.txt trunk/examples/c/CMakeLists.txt trunk/lib/csa/CMakeLists.txt trunk/lib/nistcd/CMakeLists.txt trunk/lib/nn/CMakeLists.txt trunk/lib/qsastime/CMakeLists.txt trunk/src/CMakeLists.txt Added Paths: ----------- trunk/examples/CMakeLists.txt_installed_examples.in trunk/examples/c/CMakeLists.txt_installed_examples_c Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2009-05-11 20:34:34 UTC (rev 9965) +++ trunk/examples/CMakeLists.txt 2009-05-11 21:39:43 UTC (rev 9966) @@ -260,3 +260,14 @@ DESTINATION ${DATA_DIR}/examples RENAME Makefile ) + +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt_installed_examples.in + ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt_installed_examples + @ONLY + ) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt_installed_examples + DESTINATION ${DATA_DIR}/examples + RENAME CMakeLists.txt + ) Added: trunk/examples/CMakeLists.txt_installed_examples.in =================================================================== --- trunk/examples/CMakeLists.txt_installed_examples.in (rev 0) +++ trunk/examples/CMakeLists.txt_installed_examples.in 2009-05-11 21:39:43 UTC (rev 9966) @@ -0,0 +1,32 @@ +# Top-level CMakeLists.txt for installed PLplot examples +### +### Process this file with cmake to produce Makefile +### +# Copyright (C) 2009 Alan W. Irwin +# +# This file is part of PLplot. +# +# PLplot is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; version 2 of the License. +# +# PLplot is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with PLplot; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +project(installed_plplot_examples) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.6.4 FATAL_ERROR) +# Location where PLplot cmake build system first looks for cmake modules. +set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) + +#Configurable items. +set(INCLUDE_DIR @INCLUDE_DIR@) + +include(export_plplot) +add_subdirectory(c) Property changes on: trunk/examples/CMakeLists.txt_installed_examples.in ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/examples/c/CMakeLists.txt =================================================================== --- trunk/examples/c/CMakeLists.txt 2009-05-11 20:34:34 UTC (rev 9965) +++ trunk/examples/c/CMakeLists.txt 2009-05-11 21:39:43 UTC (rev 9966) @@ -104,6 +104,11 @@ DESTINATION ${DATA_DIR}/examples/c ) +install(FILES CMakeLists.txt_installed_examples_c + DESTINATION ${DATA_DIR}/examples/c + RENAME CMakeLists.txt + ) + set(CC ${CMAKE_C_COMPILER}) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Makefile.examples.in Added: trunk/examples/c/CMakeLists.txt_installed_examples_c =================================================================== --- trunk/examples/c/CMakeLists.txt_installed_examples_c (rev 0) +++ trunk/examples/c/CMakeLists.txt_installed_examples_c 2009-05-11 21:39:43 UTC (rev 9966) @@ -0,0 +1,61 @@ +# c/CMakeLists.txt for installed PLplot examples +### +### Process this file with cmake to produce Makefile +### +# Copyright (C) 2009 Alan W. Irwin +# +# This file is part of PLplot. +# +# PLplot is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; version 2 of the License. +# +# PLplot is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with PLplot; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +set(c_STRING_INDICES + "01" + "02" + "03" + "04" + "05" + "06" + "07" + "08" + "09" + "10" + "11" + "12" + "13" + "14" + "15" + "16" + "17" + "18" + "19" + "20" + "21" + "22" + "23" + "24" + "25" + "26" + "27" + "28" + "29" + "30" + "31" + "32" + ) + +include_directories(${INCLUDE_DIR}) +foreach(STRING_INDEX ${c_STRING_INDICES}) + add_executable(x${STRING_INDEX}c x${STRING_INDEX}c.c) + target_link_libraries(x${STRING_INDEX}c plplot${LIB_TAG} ${MATH_LIB}) +endforeach(STRING_INDEX ${c_STRING_INDICES}) Property changes on: trunk/examples/c/CMakeLists.txt_installed_examples_c ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/lib/csa/CMakeLists.txt =================================================================== --- trunk/lib/csa/CMakeLists.txt 2009-05-11 20:34:34 UTC (rev 9965) +++ trunk/lib/csa/CMakeLists.txt 2009-05-11 21:39:43 UTC (rev 9966) @@ -42,7 +42,8 @@ target_link_libraries(csirocsa ${MATH_LIB}) endif(MATH_LIB) - install(TARGETS csirocsa DESTINATION + install(TARGETS csirocsa + EXPORT export_plplot ARCHIVE DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR} RUNTIME DESTINATION ${BIN_DIR} Modified: trunk/lib/nistcd/CMakeLists.txt =================================================================== --- trunk/lib/nistcd/CMakeLists.txt 2009-05-11 20:34:34 UTC (rev 9965) +++ trunk/lib/nistcd/CMakeLists.txt 2009-05-11 21:39:43 UTC (rev 9966) @@ -140,8 +140,8 @@ endif(TEST_NISTCD AND NOT CMAKE_CROSSCOMPILING) # install library and binaries - install( TARGETS - nistcd + install(TARGETS nistcd + EXPORT export_plplot ARCHIVE DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR} RUNTIME DESTINATION ${BIN_DIR} Modified: trunk/lib/nn/CMakeLists.txt =================================================================== --- trunk/lib/nn/CMakeLists.txt 2009-05-11 20:34:34 UTC (rev 9965) +++ trunk/lib/nn/CMakeLists.txt 2009-05-11 21:39:43 UTC (rev 9966) @@ -48,6 +48,7 @@ ) target_link_libraries(csironn ${QHULL_LIBRARIES}) install(TARGETS csironn + EXPORT export_plplot ARCHIVE DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR} RUNTIME DESTINATION ${BIN_DIR} Modified: trunk/lib/qsastime/CMakeLists.txt =================================================================== --- trunk/lib/qsastime/CMakeLists.txt 2009-05-11 20:34:34 UTC (rev 9965) +++ trunk/lib/qsastime/CMakeLists.txt 2009-05-11 21:39:43 UTC (rev 9966) @@ -101,6 +101,7 @@ install(FILES ${qsastime_INSTALLED_HEADERS} DESTINATION ${INCLUDE_DIR}) install(TARGETS qsastime + EXPORT export_plplot ARCHIVE DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR} RUNTIME DESTINATION ${BIN_DIR} Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2009-05-11 20:34:34 UTC (rev 9965) +++ trunk/src/CMakeLists.txt 2009-05-11 21:39:43 UTC (rev 9966) @@ -321,10 +321,12 @@ endif(USE_RPATH) install(TARGETS plplot${LIB_TAG} +EXPORT export_plplot ARCHIVE DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR} RUNTIME DESTINATION ${BIN_DIR} ) +install(EXPORT export_plplot DESTINATION ${DATA_DIR}/examples) #message("libplplot${LIB_TAG}_LINK_FLAGS = ${libplplot${LIB_TAG}_LINK_FLAGS}") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |