CMake Visual Studio project dependencies -


If a static library and a console application in my solution which uses the solution is generated by CMakeLists.txt files (top-level file and two files) as I know that the project dependencies CMake is managed Add_subdirectory () by changing the order, however, it

full high-level file for each project

  cmake_minimum_required (version 2.8) project (vtun CXX) set (target vtun) sets provide does not work for me (Boost_DEBUG ON) set (on Boost_USE_STATIC_LIBS) set (BOOST_ROOT $ {MY_BOOST_DIR}) find_package (Boost Lk55k0) if (not Boost_FOUND) Message (FATAL_ERROR "Boost Libraries are needed ") endif () add_subdirectory (vtunlib) add_subdirectory (console_client)  

The vtunlib project goes first, but anyway * .sln file dependency information and console_client were always created first is not included

CMake 3.0, visual Studio 2013

CM Project dependency ake not changing managed add_subdirectory () command. You can explicitly specify target dependency by command:

add_dependencies (; target> & lt [lt and; target-dependency>] ...)

Make a top level & lt; Goals> Depends on other top-level goals to ensure that they & lt; Goals> does.

Or do some commands like this automatically:

... to ensure that the building system that has been linked to the library -Too -Time before the target link

In the case console_client link vtunlib , command target_link_libraries (console_client vtunlib) automatically build order Will handle


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -