Skip to content

Commit

Permalink
Coalesce calls to set_target_properties in Find modules
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Dec 22, 2022
1 parent cf903c3 commit 653885d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
7 changes: 2 additions & 5 deletions cmake/Modules/FindLibDebuginfod.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,8 @@ if(LibDebuginfod_FOUND)
add_library(LibDebuginfod::LibDebuginfod UNKNOWN IMPORTED)
set_target_properties(
LibDebuginfod::LibDebuginfod PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LibDebuginfod_INCLUDE_DIRS}")

set_target_properties(
LibDebuginfod::LibDebuginfod
PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION
"${LibDebuginfod_INCLUDE_DIRS}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION
"${LibDebuginfod_LIBRARIES}")
endif()
endif()
6 changes: 2 additions & 4 deletions cmake/Modules/FindLibELF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,8 @@ if(LibELF_FOUND)
if(NOT TARGET LibELF::LibELF)
add_library(LibELF::LibELF UNKNOWN IMPORTED)
set_target_properties(LibELF::LibELF PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LibELF_INCLUDE_DIRS}")

set_target_properties(
LibELF::LibELF PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C"
"${LibELF_INCLUDE_DIRS}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${LibELF_LIBRARIES}")
endif()
endif()
6 changes: 2 additions & 4 deletions cmake/Modules/FindLibIberty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ if(LibIberty_FOUND)
if(NOT TARGET LibIberty::LibIberty)
add_library(LibIberty::LibIberty UNKNOWN IMPORTED)
set_target_properties(LibIberty::LibIberty PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${LibIberty_INCLUDE_DIRS}")

set_target_properties(
LibIberty::LibIberty PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C"
"${LibIberty_INCLUDE_DIRS}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${LibIberty_LIBRARIES}")
endif()
endif()
6 changes: 2 additions & 4 deletions cmake/Modules/FindThread_DB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ if(Thread_DB_FOUND)
if(NOT TARGET Thread_DB::Thread_DB)
add_library(Thread_DB::Thread_DB UNKNOWN IMPORTED)
set_target_properties(Thread_DB::Thread_DB PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
"${Thread_DB_INCLUDE_DIRS}")

set_target_properties(
Thread_DB::Thread_DB PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C"
"${Thread_DB_INCLUDE_DIRS}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${Thread_DB_LIBRARIES}")
endif()
endif()

0 comments on commit 653885d

Please sign in to comment.