Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add target existence checks to Unwind find module #518

Merged
merged 3 commits into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Ivan Penkov <[email protected]>
Jacob Trimble <[email protected]>
Jim Ray <[email protected]>
Marco Wang <[email protected]>
Michael Darr <[email protected]>
Michael Tanner <[email protected]>
MiniLight <[email protected]>
Peter Collingbourne <[email protected]>
Expand Down
22 changes: 12 additions & 10 deletions cmake/FindUnwind.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,17 @@ find_package_handle_standard_args (Unwind REQUIRED_VARS Unwind_INCLUDE_DIR
Unwind_LIBRARY Unwind_PLATFORM_LIBRARY VERSION_VAR Unwind_VERSION)

if (Unwind_FOUND)
add_library (unwind::unwind INTERFACE IMPORTED)
if (NOT TARGET unwind::unwind)
add_library (unwind::unwind INTERFACE IMPORTED)

set_property (TARGET unwind::unwind PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Unwind_INCLUDE_DIR}
)
set_property (TARGET unwind::unwind PROPERTY
INTERFACE_LINK_LIBRARIES ${Unwind_LIBRARY} ${Unwind_PLATFORM_LIBRARY}
)
set_property (TARGET unwind::unwind PROPERTY
IMPORTED_CONFIGURATIONS RELEASE
)
set_property (TARGET unwind::unwind PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Unwind_INCLUDE_DIR}
)
set_property (TARGET unwind::unwind PROPERTY
INTERFACE_LINK_LIBRARIES ${Unwind_LIBRARY} ${Unwind_PLATFORM_LIBRARY}
)
set_property (TARGET unwind::unwind PROPERTY
IMPORTED_CONFIGURATIONS RELEASE
)
endif (NOT TARGET unwind::unwind)
endif (Unwind_FOUND)