I have two problems related to cmake: firstly, I cannot find it in the include folder, and it does not find the main.cpp file unless I put it in the same directory as CMakeLists.text. Can you help me?
I have the following directory structure:
/TRT | +--- /src (bunch of .cpp files here) | +--- /include (header files here)
CMakeLists.txt is located in / TRT, main.cpp is located in / TRT / src, it includes / TRT / src / include.
I wrote the following CMakeLists.txt file and put it in / TRT:
cmake_minimum_required( VERSION 2.6 ) project(TRT) add_subdirectory(src) include_directories( $(TRT_SOURCE_DIR)/include ) add_executable( trt main ) target_link_libraries( glut )
Thanks in advance
source share