From: Matthias Maier Date: Mon, 2 Sep 2013 20:32:35 +0000 (+0000) Subject: Reorganize build system target exports X-Git-Tag: v8.1.0~570^2~392 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb5da9471bca6e020683dabdb27ff595b344a2cc;p=dealii.git Reorganize build system target exports git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30554 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/macros/macro_expand_instantiations.cmake b/deal.II/cmake/macros/macro_expand_instantiations.cmake index 5516eb01de..dffa1b5848 100644 --- a/deal.II/cmake/macros/macro_expand_instantiations.cmake +++ b/deal.II/cmake/macros/macro_expand_instantiations.cmake @@ -36,7 +36,7 @@ MACRO(EXPAND_INSTANTIATIONS _target _inst_in_files) IF(CMAKE_CROSSCOMPILING) - SET(_ei_exec native-expand_instantiations) + SET(_ei_exec exported-expand_instantiations) ELSE() SET(_ei_exec expand_instantiations) ENDIF() diff --git a/deal.II/cmake/scripts/CMakeLists.txt b/deal.II/cmake/scripts/CMakeLists.txt index 5ac93c43cc..99558adce8 100644 --- a/deal.II/cmake/scripts/CMakeLists.txt +++ b/deal.II/cmake/scripts/CMakeLists.txt @@ -20,8 +20,8 @@ IF(NOT CMAKE_CROSSCOMPILING) # Export expand_instantiations for use in cross compilation: # EXPORT(TARGETS expand_instantiations - FILE ${CMAKE_CURRENT_BINARY_DIR}/importExecutables.cmake - NAMESPACE native- # Prefix a namespace + FILE ${CMAKE_BINARY_DIR}/importExecutables.cmake + NAMESPACE exported- # Prefix a namespace ) ENDIF() diff --git a/deal.II/cmake/setup_post_project_call.cmake b/deal.II/cmake/setup_post_project_call.cmake index 690acf5d5d..8987b3645a 100644 --- a/deal.II/cmake/setup_post_project_call.cmake +++ b/deal.II/cmake/setup_post_project_call.cmake @@ -49,5 +49,13 @@ IF(CMAKE_CROSSCOMPILING) SET(DEAL_II_NATIVE "DEAL_II_NATIVE-NOTFOUND" CACHE FILEPATH "A pointer to a native deal.Ii build directory" ) - INCLUDE(${DEAL_II_NATIVE}/cmake/scripts/importExecutables.cmake) + INCLUDE(${DEAL_II_NATIVE}/importExecutables.cmake) ENDIF() + + +# +# Cleanup importTargets.cmake +# +FILE(REMOVE + ${CMAKE_BINARY_DIR}/importTargets.cmake + ) diff --git a/deal.II/source/CMakeLists.txt b/deal.II/source/CMakeLists.txt index bab0c9796e..e232313269 100644 --- a/deal.II/source/CMakeLists.txt +++ b/deal.II/source/CMakeLists.txt @@ -89,6 +89,12 @@ FOREACH(build ${DEAL_II_BUILD_TYPES}) ${DEAL_II_EXTERNAL_LIBRARIES} ) + EXPORT(TARGETS ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX} + NAMESPACE exported- # Prefix a namespace + FILE ${CMAKE_BINARY_DIR}/importTargets.cmake + APPEND + ) + INSTALL(TARGETS ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX} EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets DESTINATION ${DEAL_II_LIBRARY_RELDIR}