I am using CMAKE 3.4.3
for Windows, and what I'm trying to do is set the path in CMAKE and try to access this in my C ++ file.
What I tried was as follows:
In the CMakeLists.txt file
ADD_DEFINITIONS(-DNV12_2_ARGB_PTX_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ptx")
Now I will try to access it from my C ++ file as follows:
#ifdef NV12_2_ARGB_PTX_DIR #define PTX_DIR D_NV12_2_ARGB_PTX_DIR #endif
And when I try to reference it as:
std::cout << PTX_DIR << std::endl;
I get an error message:
'C:/Users/Luca/project/src/lib/ptx': No such file or directory
In addition, Visual Studio intellisense complains:
IntelliSense: identifier "PTX_DIR" is undefined
Not sure why he wants to open a file with this variable ...
source share