I am using CMake to generate Visual Studio projects. Everything works fine except one thing.
The startup project in the solution is always ALL_BUILD
. Ho
Since Visual 2005, the configuration is stored in a file name projectname.vc(x)proj.user, which is plain xml.
I don't know about a way to change the startup project, but you certainly can set ALL_BUILD to run the desired executable instead of displaying the stupid popup :
create_default_target_launcher(
your_desired_target_name
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/desired_path/"
# or ${CMAKE_CURRENT_BINARY_DIR}, depending on your setup
)
This module is available on rpavlik's github. You simply need to add this in your topmost CMakeLists.txt :
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/external/rpavlik-cmake-modules-1c73e35") # or whichever path you put the module in.
include(CreateLaunchers)
Examples available here.