- I am including a CMakeLists. It's in a git submodule, so I can't easily change it. - It compiles a helper tool. This won't work because it will build it for Android, not the building OS - I can use add_executable(toolname ALIAS othertool) to override this and run something else
you want to add_executable(minilua IMPORTED) and then set_target_properties(minilua IMPORTED_LOCATION ${PATH_TO_MINILUA}) to get it to call the minilua you want
-
-
Hm I guess add_executable can't be overridden? If I put it after the add_subdirectory it says "already exists", if I put it before, it says that AND gets upset when the sub-CMakeLists tries to add libraries to what it thinks is its own targetpic.twitter.com/5Da9te8Vi2
-
yeah I don't think you can redefine targets with just that, BUT you can just skip add_executable and go straight to modifying properties, which is what you want!
-
Hm, ok. So I can set the IMPORTED_LOCATION this way. However if it is not already an IMPORTED variable, it looks like I can't transform a non-IMPORTED target to an IMPORTED one? "Read-only" https://cmake.org/cmake/help/v3.0/prop_tgt/IMPORTED.html …
-
this is the point where i would fork, personally.
-
yeah. i think so.
-
thanks again
-
Y'know what would really make this all more bearable, is if there were a way to do add_subdirectory() while specifying a "replacement" CMakeLists.txt to use instead of whatever is or isn't in the directory
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.