My CMake project depends on zipper library which is a wrapper on top of minizip/zlib. The zipper is a git submodule (in /thirdparty/zipper directory) of my project and so I compile it with the add_subdirectory command:
/CMakeLists.txt:
add_subdirectory(../../thirdparty thirdparty)
/thirdparty/CMakeLists.txt:
add_subdirectory(zlib)
add_subdirectory(zipper)
When I compile the thirdparty project it compiles zlib and zipper independently, so the zipper looks for zlib in the LD_LIBRARY_PATH but I want zipper to link again just compiled zlibstatic near it. How to do that?