I am porting some packages from Linux to windows and I've found that visual studio has quite good integration with cmake. I am able to configure and build the project using cmake but I cannot figure out how to run cpack to create the installation package.
This question - How to create an installer with CMake + CPack + NSIS on Windows? - suggests that a PACKAGE.vcxproj file should be created by the build. It is but there doesn't appear to be anyway to build/run it from inside visual studio
It seems a strange oversight as:
- cmake integration is very good
- ctest tests can be run via the tests menu
- the install target can be run via the build menu but there is no menu option to create packages with cpack.
Note I am trying to create ZIP or TGZ package and don't need the extra complication of NSIS at this time. I am using VS2019
PACKAGEproject not show up in your Solution Explorer menu? It is often grouped with the other CMake predefined targets (e.g.INSTALL,ZERO_CHECK, etc.) - squareskittlesset_property(GLOBAL PROPERTY USE_FOLDERS ON)) It is possible that the predefined targets are in a collapsed folder. Without knowing the specifics of how you generated the solution file, it is difficult to say why these pre-defined CMake projects are not showing in your Solution Explorer. There is even a question for how to get rid of them, because they are almost always available. - squareskittles