David Cole via cmake-developers wrote: > Is there a good reason why this error must be an error? > > CMake Error at CMakeLists.txt:23 (add_library): > add_library cannot create ALIAS target "MyProj::gtest" because > target "OtherProj::googletest" is IMPORTED. > > The line of code is: > > add_library(MyProj::gtest ALIAS OtherProj::googletest) > > Why is there any restriction on ALIAS targets about what sorts of > targets they may be aliases of?
They were introduced here: https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=370bf554151a1 Aside from the information there, other commits may have extended or tweaked the features/restrictions. > After my find_package(OtherProj) call, which is a super build which > defines lots of imported targets, I want the target to be named gtest > to match its library name, but OtherProj has named it googletest. Why isn't there a standard name? Should upstream provide the imported target? Has any effort been made to make upstream provide it? Is the name from OtherProj namespaced? Why do you need it to have a particular name? Why does OtherProj expose it? Should it expose that target for you to use (it seems an internal thing to me)? Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers