Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LoadStaticSharedTargets
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CMake
LoadStaticSharedTargets
Commits
9368cf50
Unverified
Commit
9368cf50
authored
1 year ago
by
Tim Kaune
Browse files
Options
Downloads
Patches
Plain Diff
Rename internal macro so it doesn't sound weird
parent
d21e55fc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cmake/LoadStaticSharedTargets.cmake
+8
-8
8 additions, 8 deletions
src/cmake/LoadStaticSharedTargets.cmake
with
8 additions
and
8 deletions
src/cmake/LoadStaticSharedTargets.cmake
+
8
−
8
View file @
9368cf50
...
@@ -84,26 +84,26 @@ macro(load_static_shared_targets)
...
@@ -84,26 +84,26 @@ macro(load_static_shared_targets)
# Static component requested
# Static component requested
if
(
${
CMAKE_FIND_PACKAGE_NAME
}
_COMP_static
)
if
(
${
CMAKE_FIND_PACKAGE_NAME
}
_COMP_static
)
_static_shared_load_targets
(
STATIC
)
_load
_static_shared_
targets_
load_targets
(
STATIC
)
# Shared component requested
# Shared component requested
elseif
(
${
CMAKE_FIND_PACKAGE_NAME
}
_COMP_shared
)
elseif
(
${
CMAKE_FIND_PACKAGE_NAME
}
_COMP_shared
)
_static_shared_load_targets
(
SHARED
)
_load
_static_shared_
targets_
load_targets
(
SHARED
)
# ${CMAKE_FIND_PACKAGE_NAME}_SHARED_LIBS cache variable set to ON
# ${CMAKE_FIND_PACKAGE_NAME}_SHARED_LIBS cache variable set to ON
elseif
(
DEFINED
${
CMAKE_FIND_PACKAGE_NAME
}
_SHARED_LIBS AND
${
CMAKE_FIND_PACKAGE_NAME
}
_SHARED_LIBS
)
elseif
(
DEFINED
${
CMAKE_FIND_PACKAGE_NAME
}
_SHARED_LIBS AND
${
CMAKE_FIND_PACKAGE_NAME
}
_SHARED_LIBS
)
_static_shared_load_targets
(
SHARED
)
_load
_static_shared_
targets_
load_targets
(
SHARED
)
# ${CMAKE_FIND_PACKAGE_NAME}_SHARED_LIBS cache variable set to OFF
# ${CMAKE_FIND_PACKAGE_NAME}_SHARED_LIBS cache variable set to OFF
elseif
(
DEFINED
${
CMAKE_FIND_PACKAGE_NAME
}
_SHARED_LIBS AND NOT
${
CMAKE_FIND_PACKAGE_NAME
}
_SHARED_LIBS
)
elseif
(
DEFINED
${
CMAKE_FIND_PACKAGE_NAME
}
_SHARED_LIBS AND NOT
${
CMAKE_FIND_PACKAGE_NAME
}
_SHARED_LIBS
)
_static_shared_load_targets
(
STATIC
)
_load
_static_shared_
targets_
load_targets
(
STATIC
)
# BUILD_SHARED_LIBS variable set to ON
# BUILD_SHARED_LIBS variable set to ON
elseif
(
BUILD_SHARED_LIBS
)
elseif
(
BUILD_SHARED_LIBS
)
# If shared targets are installed, include them.
# If shared targets are installed, include them.
# Otherwise at least load the static targets
# Otherwise at least load the static targets
_static_shared_load_targets
(
SHARED ALTERNATIVE STATIC
)
_load
_static_shared_
targets_
load_targets
(
SHARED ALTERNATIVE STATIC
)
# BUILD_SHARED_LIBS variable set to OFF
# BUILD_SHARED_LIBS variable set to OFF
else
()
else
()
# If static targets are installed, include them.
# If static targets are installed, include them.
# Otherwise at least load the shared targets
# Otherwise at least load the shared targets
_static_shared_load_targets
(
STATIC ALTERNATIVE SHARED
)
_load
_static_shared_
targets_
load_targets
(
STATIC ALTERNATIVE SHARED
)
endif
()
endif
()
unset
(
${
CMAKE_FIND_PACKAGE_NAME
}
_KNOWN_COMPS
)
unset
(
${
CMAKE_FIND_PACKAGE_NAME
}
_KNOWN_COMPS
)
...
@@ -117,7 +117,7 @@ endmacro()
...
@@ -117,7 +117,7 @@ endmacro()
# Macro to check, if the target files for the requested type are all installed.
# Macro to check, if the target files for the requested type are all installed.
# If so, include them. Otherwise, try alternative type, if given. Do error
# If so, include them. Otherwise, try alternative type, if given. Do error
# handling, if not.
# handling, if not.
macro
(
_static_shared_load_targets TYPE
)
macro
(
_
load_
static_shared_
targets_
load_targets TYPE
)
cmake_parse_arguments
(
${
CMAKE_FIND_PACKAGE_NAME
}
""
"ALTERNATIVE"
""
${
ARGN
}
)
cmake_parse_arguments
(
${
CMAKE_FIND_PACKAGE_NAME
}
""
"ALTERNATIVE"
""
${
ARGN
}
)
# We now have ${CMAKE_FIND_PACKAGE_NAME}_ALTERNATIVE variable created for us.
# We now have ${CMAKE_FIND_PACKAGE_NAME}_ALTERNATIVE variable created for us.
...
@@ -151,7 +151,7 @@ macro(_static_shared_load_targets TYPE)
...
@@ -151,7 +151,7 @@ macro(_static_shared_load_targets TYPE)
"Requested `
${
TYPE
}
` targets for package
${
CMAKE_FIND_PACKAGE_NAME
}
were not found. "
"Requested `
${
TYPE
}
` targets for package
${
CMAKE_FIND_PACKAGE_NAME
}
were not found. "
"Trying alternative `
${${
CMAKE_FIND_PACKAGE_NAME
}
_ALTERNATIVE
}
` targets."
"Trying alternative `
${${
CMAKE_FIND_PACKAGE_NAME
}
_ALTERNATIVE
}
` targets."
)
)
_static_shared_load_targets
(
${${
CMAKE_FIND_PACKAGE_NAME
}
_ALTERNATIVE
}
)
_load
_static_shared_
targets_
load_targets
(
${${
CMAKE_FIND_PACKAGE_NAME
}
_ALTERNATIVE
}
)
else
()
else
()
set
(
${
CMAKE_FIND_PACKAGE_NAME
}
_NOT_FOUND_MESSAGE
set
(
${
CMAKE_FIND_PACKAGE_NAME
}
_NOT_FOUND_MESSAGE
"
${
CMAKE_FIND_PACKAGE_NAME
}
`
${
TYPE
}
` libraries were requested but not found."
)
"
${
CMAKE_FIND_PACKAGE_NAME
}
`
${
TYPE
}
` libraries were requested but not found."
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment