Modding, Mission Design, and Coding > FS2 Open Coding - The Source Code Project (SCP)

The CMake build system

<< < (2/13) > >>

Is it possible to have the EXEs automatically be copied to the FS2 folder? The pre-CMake projects did this and I enjoyed the convenience. (In case you want to know, I left all settings at their defaults: CMAKE_INSTALL_PREFIX and FSO_FREESPACE_PATH are set to my FS2 folder, but EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH are not.)

If you build the "INSTALL" target, the executables and DLLs will be copied to your FSO folder.

I figured out how to make Visual Studio 2015 build the INSTALL target when F7 is pressed:

* In Solution Explorer (typically found on the left), right-click "Solution 'FS2_Open'".
* Click "Properties".
* In the left pane, expand "Configuration Properties", then select "Configuration".
* In the "Configuration" drop-down box at the top-left, select "Debug".
* Make sure the "INSTALL" project's Build check box is checked.
* Click Apply.
* Repeat steps 4-6 with the FastDebug and Release configurations.
* Click OK.
Is there a reason that the INSTALL target is not enabled by default?

The reason is that a build of the entire project should not have any side effects outside the build directory. If you want to copy the files to the FSO directory you can just build the INSTALL project and everything else will be done automatically. If you just want to start the new executable directly, you don't have to copy it. Just use Ctrl+F5 and FSO will be started with the correct root directory.

Okay, I gave this a try but the builds are not being automatically moved to my FS2 folder at the end of the build process any more. Is this intentional or did I configure something incorrectly?


[0] Message Index

[#] Next page

[*] Previous page

Go to full version