Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make CMake generated INSTALL be generated when selecting "Build solution"

I have a Visual Studio 2015 solution generated by CMake. CMake created a "INSTALL" project that copies all the files I requested (using Cmake's install command in my CMakeLists.txt files).

This "INSTALL" project is skipped when I request a full solution build

I tried to add set_target_properties(INSTALL PROPERTIES EXCLUDE_FROM_ALL FALSE) but this reports set_target_properties Can not find target to add properties to: INSTALL.

How can I make "INSTALL" be generated by default? I'd like the checkbox surrounded in red in screenshot below to be enabled automatically:

enter image description here

like image 629
jpo38 Avatar asked Dec 10 '22 13:12

jpo38


1 Answers

You can use CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD:

set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
like image 172
Florian Avatar answered May 30 '23 07:05

Florian