I'm writing a c project using cmake on a mac. I use homebrew. I installed libpqxx via homebrew. I have the following CMakeLists.txt.
cmake_minimum_required(VERSION 3.11)
project(imagedb)
set(CMAKE_CXX_STANDARD 14)
add_executable(imagedb main.cpp)
target_link_libraries( imagedb /usr/local/lib/libpqxx.dylib)
While this builds I would like to avoid using an absolute path here. How can I do this using cmake given that /usr/local
is already in the path prefix?