I am having the problem printing the variable like INTERFACE_INCLUDE_DIRECTORIES
, I would show the simple CMakeLists.txt
that I write:
cmake_minimum_required(VERSION 3.5)
project(Library)
add_library(hello src/hello.cpp)
target_include_directories(hello PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
message(STATUS "The interface_include_directories : ${INTERFACE_INCLUDE_DIRECTORIES}")
As shown above, ${CMAKE_CURRENT_SOURCE_DIR}/include
should be in the INTERFACE_INCLUDE_DIRECTORIES
after target_include_directories
,
However, it prints an empty string instead.
I would like to know if there is anyway to print the include path that is related to specific library ,hello
for example in this case.