Skip to content

Commit

Permalink
remove checks, fix interface target
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaskenez committed Nov 8, 2024
1 parent 29e8d87 commit 45bda1f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions cmake/carmaDependencyTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,13 @@ IF (NOT TARGET armadillo::armadillo)
IF (TARGET armadillo)
ADD_LIBRARY(armadillo::armadillo ALIAS armadillo)
ELSEIF (Armadillo_FOUND)
IF (NOT ARMADILLO_INCLUDE_DIRS OR NOT ARMADILLO_LIBRARIES)
message(FATAL_ERROR "Armadillo_FOUND is true but ARMADILLO_INCLUDE_DIRS or ARMADILLO_LIBRARIES are not set.")
ENDIF ()
ADD_LIBRARY(armadillo::armadillo INTERFACE)
TARGET_INCLUDE_DIRECTORIES(armadillo::armadillo INTERFACE ${ARMADILLO_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(armadillo::armadillo INTERFACE ${ARMADILLO_LIBRARIES})
ADD_LIBRARY(armadillo INTERFACE)
TARGET_INCLUDE_DIRECTORIES(armadillo INTERFACE ${ARMADILLO_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(armadillo INTERFACE ${ARMADILLO_LIBRARIES})
ADD_LIBRARY(armadillo::armadillo ALIAS armadillo)
ENDIF ()
ENDIF ()
IF (TARGET armadillo::armadillo)
IF (NOT ARMADILLO_INCLUDE_DIRS)
message(FATAL_ERROR "armadillo::armadillo is a target but ARMADILLO_INCLUDE_DIRS is not set.")
ENDIF ()
LIST(APPEND carma_INCLUDE_DIRS ${ARMADILLO_INCLUDE_DIRS})
ENDIF ()

Expand Down

0 comments on commit 45bda1f

Please sign in to comment.