Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake build files #7

Open
Erriez opened this issue Mar 20, 2024 · 1 comment
Open

Add CMake build files #7

Erriez opened this issue Mar 20, 2024 · 1 comment

Comments

@Erriez
Copy link

Erriez commented Mar 20, 2024

I've plans to develop a DAW integration for a new surface controller in REAPER 7. In the early days, the build files were only available for VisualStudio for Windows. REAPER currently supports Windows, Linux and MAC which is probably based on CMake.

Would it be possible to add the platform independent build files to this repository? Or should I use a different repository to build a platform independent reaper_csurf?

@Erriez
Copy link
Author

Erriez commented Jun 16, 2024

Possible workaround:

Install Visual Studio 2022
Open `reaper-plugins/reaper_csurf/reaper_csurf-x64.vcproj` once, close project and save `.sln` to default location.

# Install Python3 and cmake_converter
pip install cmake_converter

cd reaper-plugins/reaper_csurf

cmake-converter -s reaper_csurf-x64.sln
cmake -S . -B build
cmake --build build

Edit CMakeLists.txt and set OUTPUT_DIRECTORY_DEBUG to absolute path "C:\\Users\\Username\\AppData\\Roaming\\REAPER\\UserPlugins"

Open directory reaper-plugins/reaper_csurf with VCode.
At the bottom of VCode:
- Set CMake: [Debug]
- Set default kit to Visual Studio Community 2022 Release - amd64.
- Set the default build target: reaper_csurf.

Create .vscode/launch.json:
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(Windows) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "C:\\Program Files\\REAPER (x64)\\reaper.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
        }
    ]
}

Press F5 to start debugging.

Update: The resource file is not included and is not working:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant