Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libxslt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
libraries
libxslt
Commits
23a0b7763696
Commit
23a0b7763696
authored
4 years ago
by
Markus Rickert
Browse files
Options
Downloads
Patches
Plain Diff
Check if target exists when reading target properties
parent
a84cf441d6ba
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
libxslt-config.cmake.cmake.in
+38
-34
38 additions, 34 deletions
libxslt-config.cmake.cmake.in
with
38 additions
and
34 deletions
libxslt-config.cmake.cmake.in
+
38
−
34
View file @
23a0b776
...
...
@@ -19,6 +19,7 @@
set(LIBXSLT_EXSLT_LIBRARY_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_LIBDIR@")
macro(select_library_location target basename)
if(TARGET ${target})
foreach(property IN ITEMS IMPORTED_LOCATION IMPORTED_IMPLIB)
get_target_property(${basename}_${property}_DEBUG ${target} ${property}_DEBUG)
get_target_property(${basename}_${property}_MINSIZEREL ${target} ${property}_MINSIZEREL)
...
...
@@ -41,6 +42,7 @@
set(${basename}_LIBRARY ${${basename}_${property}_DEBUG})
endif()
endforeach()
endif()
endmacro()
macro(select_executable_location target basename)
...
...
@@ -44,6 +46,7 @@
endmacro()
macro(select_executable_location target basename)
if(TARGET ${target})
get_target_property(${basename}_IMPORTED_LOCATION_DEBUG ${target} IMPORTED_LOCATION_DEBUG)
get_target_property(${basename}_IMPORTED_LOCATION_MINSIZEREL ${target} IMPORTED_LOCATION_MINSIZEREL)
get_target_property(${basename}_IMPORTED_LOCATION_RELEASE ${target} IMPORTED_LOCATION_RELEASE)
...
...
@@ -58,6 +61,7 @@
elseif(${basename}_IMPORTED_LOCATION_DEBUG)
set(${basename}_EXECUTABLE ${${basename}_IMPORTED_LOCATION_DEBUG})
endif()
endif()
endmacro()
select_library_location(LibXslt::LibXslt LIBXSLT)
...
...
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