From: maier Date: Wed, 26 Sep 2012 21:29:45 +0000 (+0000) Subject: Why is this all so ugly? Bugfix: Only add a target library if there is X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e614cd292f19f2e37dad7364f9a4ddf826a91b3a;p=dealii-svn.git Why is this all so ugly? Bugfix: Only add a target library if there is one... git-svn-id: https://svn.dealii.org/branches/branch_cmake@26765 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake b/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake index c917f38e67..022df90310 100644 --- a/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake +++ b/deal.II/cmake/macros/macro_deal_ii_setup_target.cmake @@ -30,16 +30,28 @@ MACRO(DEAL_II_SETUP_TARGET target) "${DEAL_II_USER_DEFINITIONS_RELEASE}" ) - TARGET_LINK_LIBRARIES(${target} - debug - ${DEAL_II_LIBRARIES_DEBUG} - ${DEAL_II_EXTERNAL_LIBRARIES_DEBUG} - optimized - ${DEAL_II_LIBRARIES_RELEASE} - ${DEAL_II_EXTERNAL_LIBRARIES_RELEASE} - general - ${DEAL_II_EXTERNAL_LIBRARIES} - ) + IF(NOT "${DEAL_II_LIBRARIES_DEBUG}${DEAL_II_EXTERNAL_LIBRARIES_DEBUG}" STREQUAL "") + TARGET_LINK_LIBRARIES(${target} + debug + ${DEAL_II_LIBRARIES_DEBUG} + ${DEAL_II_EXTERNAL_LIBRARIES_DEBUG} + ) + ENDIF() + + IF(NOT "${DEAL_II_LIBRARIES_RELEASE}${DEAL_II_EXTERNAL_LIBRARIES_RELEASE}" STREQUAL "") + TARGET_LINK_LIBRARIES(${target} + optimized + ${DEAL_II_LIBRARIES_RELEASE} + ${DEAL_II_EXTERNAL_LIBRARIES_RELEASE} + ) + ENDIF() + + IF(NOT "${DEAL_II_EXTERNAL_LIBRARIES}" STREQUAL "") + TARGET_LINK_LIBRARIES(${target} + general + ${DEAL_II_EXTERNAL_LIBRARIES} + ) + ENDIF() ENDMACRO()