Skip to content
Snippets Groups Projects
Commit 53e224e7 authored by Markus Blatt's avatar Markus Blatt
Browse files

[cmake,release] Prevent searching twice for modules.


Before we tried to search for dune-common twice (once without a version
and then with the required version). Unfortunately this breaks because
we are adding the same library target twice. With this patch we only
search for a module once.
(cherry picked from commit b58b8475)

Signed-off-by: default avatarMarkus Blatt <markus@dr-blatt.de>
parent d09183de
No related tags found
No related merge requests found
......@@ -105,14 +105,14 @@ macro(find_dune_package module)
extract_major_minor_version("${DUNE_FIND_VERSION_NUMBER}" DUNE_FIND_VERSION)
set(DUNE_FIND_VERSION_STRING "${DUNE_FIND_VERSION_MAJOR}.${DUNE_FIND_VERSION_MINOR}.${DUNE_FIND_VERSION_REVISION}")
endif(DUNE_FIND_VERSION MATCHES "(>=|=|<=).*")
if(NOT DUNE_${module}_FOUND)
if(NOT ${module}_FOUND)
if(NOT (${module}_DIR OR ${module}_ROOT OR
"${CMAKE_PREFIX_PATH}" MATCHES ".*${module}.*"))
string(REPLACE ${ProjectName} ${module} ${module}_DIR
${PROJECT_BINARY_DIR})
endif()
find_package(${module} ${DUNE_FIND_VERSION_STRING} NO_CMAKE_PACKAGE_REGISTRY)
endif(NOT DUNE_${module}_FOUND)
endif(NOT ${module}_FOUND)
if(NOT ${module}_FOUND)
message(STATUS "No full CMake package configuration support available."
" Falling back to pkg-config.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment