Commit 234337d2 authored by Nicolas Michon's avatar Nicolas Michon

Fix cmake config file

parent e818bcb9
......@@ -34,18 +34,19 @@ include("${CMAKE_CURRENT_LIST_DIR}/DecafTargets.cmake")
if(@ENABLE_SHARED@)
set(DECAF_TARGETNAME decaf)
set(DECAF_LIBRARIES ${DECAF_TARGETNAME})
else()
set(DECAF_TARGETNAME decaf-static)
if(TARGET ${DECAF_TARGETNAME})
get_target_property(DECAF_LIBRARIES ${DECAF_TARGETNAME} LOCATION)
get_target_property(DECAF_LINK_LIBRARIES ${DECAF_TARGETNAME} INTERFACE_LINK_LIBRARIES)
if(DECAF_LINK_LIBRARIES)
list(APPEND DECAF_LIBRARIES ${DECAF_LINK_LIBRARIES})
endif()
endif()
endif()
get_target_property(DECAF_INCLUDE_DIRS ${DECAF_TARGETNAME} INTERFACE_INCLUDE_DIRECTORIES)
if(TARGET ${DECAF_TARGETNAME})
get_target_property(DECAF_LIBRARIES ${DECAF_TARGETNAME} LOCATION)
get_target_property(DECAF_LINK_LIBRARIES ${DECAF_TARGETNAME} INTERFACE_LINK_LIBRARIES)
if(DECAF_LINK_LIBRARIES)
list(APPEND DECAF_LIBRARIES ${DECAF_LINK_LIBRARIES})
endif()
endif()
set(DECAF_CPPFLAGS @DECAF_CPPFLAGS@)
set(DECAF_FOUND 1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment