Create static lib packing all dependencies

Viewed 209

I have a CMakeLists.txt for creating a static lib, and I want to pack it with all the dependencies it will need so that the users of my lib don't need to download the libs it depends on.

e.g., my lib depends on OpenCV, so I don't want my users to download OpenCV in order to use my lib.

How can I accomplish this?

For now, I have the following,

file(GLOB LIB_SOURCES
    *.cpp
)


include_directories(include)
include_directories(tools)

add_library(myLib STATIC ${LIB_SOURCES})
target_link_libraries(myLib ${OpenCV_LIBS})
0 Answers
Related