Skip to content

Commit

Permalink
c: Fix setting target interface_include_dirs when it is a list.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanvolz committed Feb 6, 2018
1 parent a8ba65e commit dfcd0d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
12 changes: 5 additions & 7 deletions c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ foreach(LIB IN LISTS HDF5_LIBRARIES)
set_target_properties(digital_rf::${TGT} PROPERTIES
IMPORTED_LOCATION ${LIB}
)
if(${TGT} STREQUAL "hdf5")
if(HDF5_INCLUDE_DIRS)
set_target_properties(digital_rf::${TGT} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${HDF5_INCLUDE_DIRS}
)
endif(HDF5_INCLUDE_DIRS)
endif(${TGT} STREQUAL "hdf5")
if(HDF5_INCLUDE_DIRS)
set_property(TARGET digital_rf::${TGT} APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${HDF5_INCLUDE_DIRS}
)
endif(HDF5_INCLUDE_DIRS)
endforeach(LIB)

# build/install libdigital_rf
Expand Down
12 changes: 5 additions & 7 deletions c/cmake/libdigital_rfConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ foreach(LIB IN LISTS HDF5_LIBRARIES)
set_target_properties(digital_rf::${TGT} PROPERTIES
IMPORTED_LOCATION ${LIB}
)
if(${TGT} STREQUAL "hdf5")
if(HDF5_INCLUDE_DIRS)
set_target_properties(digital_rf::${TGT} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${HDF5_INCLUDE_DIRS}
)
endif(HDF5_INCLUDE_DIRS)
endif(${TGT} STREQUAL "hdf5")
if(HDF5_INCLUDE_DIRS)
set_property(TARGET digital_rf::${TGT} APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${HDF5_INCLUDE_DIRS}
)
endif(HDF5_INCLUDE_DIRS)
endforeach(LIB)

include("${CMAKE_CURRENT_LIST_DIR}/libdigital_rfTargets.cmake")

0 comments on commit dfcd0d1

Please sign in to comment.