Lets consider myself as newbie, First, I would say all these are working completely fine, Here everytime I build, all deps will compile again. So I want to build all deps and keep its built file(headers and libraries) in separate folder and use it through out compilation without using extenal deps. Now, I can able to build static and dynamically(Shared). I want to do the same, but as I said above, I want external deps built file to be separate folder. like I said “Build once and use multiple times”.
mydir/ project/ build/ CMakeLists.txt #toplevel or root level Cmake deps/ curl-7.43.0/ libiconv-1.14/ libpng-1.6.18/ libssh2-1.6.0/ openssl-1.0.2d/ sqlite/ tinycthread/ zlib-1.2.8/ CMakeLists.txt #contains all deps as external_project_add src/ foo-1/ foo-1/ foo-1.hpp foo-1.cpp test/ test.cpp CMakeLists.txt foo-2/ foo-2/ foo-2.hpp foo-2.cpp test/ test.cpp CMakeLists.txt #contains target link library and other . . . n files CMakeLists.txt # contains all src file as subdirectiory_add(foo-1) and so on
Any leads will be appreciated.
P.S: I dont want install via package(linux). Since I want to run this in both windows and linux. I want to compile using CMake only.