Hi Martin,
please consider using the following commands in order to include your library in other projects that use cmake (via the add_subdirectory(path) command) much easier:
target_include_directories(edlib PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/edlib/include>
$<INSTALL_INTERFACE:include>)
target_include_directories(edlib_static PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/edlib/include>
$<INSTALL_INTERFACE:include>)
They will add the right path of 'edlib.h' while compiling. Add them after library creation and remove the include_directories(edlib/include) command.
Hi Martin, please consider using the following commands in order to include your library in other projects that use cmake (via the
add_subdirectory(path)
command) much easier:They will add the right path of 'edlib.h' while compiling. Add them after library creation and remove the
include_directories(edlib/include)
command.Best regards, Robert