I currently have a directory that looks like this
dir1/
dirA/
dirAa/
CMakeLists.txt <- add_library(x STATIC x.cpp)
dirB/
dirBb/
dirBbb/
y is a static library that depends on DirAa (x) Library
How would I link those directories? using the relative paths didn't work when I tried linking y to x. in y.cpp
, I've tried using <x.h>
and "x.h"
. When I used the former, depending on which line it's declared, y.h
becomes undeclared.
in my dirAa CMake file, I have
add_library(x STATIC x.cpp)
install(TARGETS x DESTINATION lib)
and in my dirBb directory, without the junk that I tried putting in:
add_library(y y.cpp)
target_link_libraries(y <a library with install destination bin>)
I'm trying to link y and x together.