caseymcc / UE4CMake

Provides a simple way to add a cmake lib to any Unreal Engine 4 (UE4) or 5 (UE5) project.
MIT License
84 stars 16 forks source link

Possibility to add a list of targets for a targetLocation? #6

Closed fsvenson closed 1 year ago

fsvenson commented 1 year ago

Currently a call to add() is needed for each added target, this in turn invokes CMake. If I want to add several targets from the same CMakeLists.txt, CMake will be invoked once for each target even though, in theory, only a single invocation should be needed.

A nice feature would be if we could support this use case of adding several targets for one location and only invoce CMake once for that location.

caseymcc commented 1 year ago

I am less inclined to do this, I know cmake allows multiple targets per CMakeLists.txt I can't really see a reason for it. Likely the multiple targets should be included to a single target before use. I think the additional targets would make the interface a little clumsy (some list of targets, and some list of options for each target)

I originally read this as multiple CMakeLists.txt targets in one cmake call but even that is likely better served calling cmake multiple times.

caseymcc commented 1 year ago

Going to close for now