How to build and install cmake targets only if the other targets depend on them? -


my application consists of core, many shared libraries , many plugins use these shared libraries. i'm using cmake option() command enable / disable each plugin.

what i'd build , install shared library if it's required 1 of enabled plugins.

i tried using following in directories of shared libraries:

set_directory_properties(properties exclude_from_all true) 

however, targets still being built in visual studio. gnu make in linux correctly avoids building them. however, required libraries no longer installed using install() in either system.

i tried adding exclude_from_default_build false library targets, cmake complained undefined behavior of install() disabled targets.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -