orocos-toolchain / orogen

Code generator for components and type handling in Rock - the Robot Construction Kit - and the Orocos Toolchain
http://rock-robotics.org
Other
4 stars 35 forks source link

gen: allow to set the cmake keyword to target_link_libraries #139

Closed 2maz closed 4 years ago

2maz commented 4 years ago

CMake Policy 0023 states that: "Plain and keyword target_link_libraries() signatures cannot be mixed."

Therefore this change permits the keyword use when needed through context.

doudou commented 4 years ago

Since the only use-case so far for this is having private dependencies, could we actually just have a private true/false argument ?

Alternatively, if what you really want is flexibility, I would refactor the code to have a each_pkgconfig_link enumerator that is used in different places to generate the CMake code (i.e. have your template generate its own specific target_link_libraries). I don't think it makes sense to attempt extending this method to have some kind of weird 1:1 mapping with the target_link_libraries command.

2maz commented 4 years ago

Alternatively, if what you really want is flexibility, I would refactor the code to have a each_pkgconfig_link enumerator that is used in different places to generate the CMake code (i.e. have your template generate its own specific target_link_libraries).

I go for that one then - see update