Dear all,
Project has following structure (and I can't change it)
-project
-module1
-CMakeLists.txt (module1 build rules, depends on module2 using
add_subdirectory("../module2" "${binarypath}")
-lib1
-CMakeLists.txt (depends on lib3)
-lib2
-CMakeLists.txt
-module2
-lib3
-CMakeLists.txt
-lib4
-CMakeLists.txt
But ninja generator generates build rule with absolute paths:
build d$:\project\module2\lib3:....
But depends it as ..\module2\lib3
as a result I got following error:
ninja: error: '../module2/lib3.lib', needed by 'lib1', missing and no known
rule to make it
I added additional phony to build.ninja and it worked:
build ../module2/lib3.lib: phony d$:\project\module2\lib3
How should I fix CMake files to generate same names/aliases for targets?
--
Best Wishes,
Vladimir Yelnikov
--
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