Skip to content
Discussion options

You must be logged in to vote

my solution looked something like this. if there is a cleaner approach, i'd appreciate if someone shares it ❤️

set_project('my-project')
set_version('0.1')

option('mydependlib-libpath')
    set_description('Path to mydependlib library')
option_end()

option('mydependlib-includepath')
    set_description('Path to mydependlib headers')
option_end()

if not has_config('mydependlib-libpath', 'mydependlib-includepath') then
    add_requires('mydependlib')
end

target('my-lib')
    add_files('main.c')
    add_links('mydependlib')
    
if has_config('mydependlib-libpath', 'mydependlib-includepath') then
    add_includedirs('$(mydependlib-includepath)')
    add_linkdirs('$(mydependlib-libpath)')
e…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by corpserot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant