I am new to CMake, and need some directions on a simple issue: I build the gecode from source in my Ubuntu 18.04 machine by following this link. The library is installed in /opt/gecode-release-6.2.0 directory. I have a C++ simple project whose source code make use of the gecode library functions, and the project is built using CMake. However it seems like the computer cannot find where the gecode is installed.
I have tried the following in my CMakeLists.txt hoping the gecode library can be correctly located, but none is working:
include_directories(${LD_LIBRARY_PATH})find_library(GECODE_LIB gecode)link_directories(${LD_LIBRARY_PATH})include_directories(/opt/gecode-release-6.2.0)
I have figured out a working version, the CmakeLists.txt is as shown in the picture below: enter image description here