I am using the following cmake config:
SET(PROJECT_NAME MyProject)
ADD_LIBRARY(${PROJECT_NAME} INTERFACE)
SET(AZRA_OPENSSL_INCLUDE_DIRECTORY ${PROJECT_SOURCE_DIR}/deps/openssl/include)
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} INTERFACE ${AZRA_OPENSSL_INCLUDE_DIRECTORY})
MESSAGE("USED OPENSSL INCLUDE DIRECTORY" ${AZRA_OPENSSL_INCLUDE_DIRECTORY})
I can print AZRA_OPENSSL_INCLUDE_DIRECTORY
and it points to the exact include openssl directory that I have cloned from github (I did not do anything else). When doing:
#include <openssl/ssl.h>
I get an error Cannot open include file: 'openssl/ssl.h': No such file or directory
while if I put the full path:
#include <C:/MyLibrary/deps/openssl/include/openssl/ssl.h>
It works, any idea how I can fix that please? I can not use the absolute path in the above as it wouldn’t be possible to use on another pc with different library location, note as well that this works perfectly when changing openssl with another library I have cloned as well i.e. boost.