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

Visual Studio support suggestion #1

Open
reubengann opened this issue Aug 27, 2023 · 0 comments
Open

Visual Studio support suggestion #1

reubengann opened this issue Aug 27, 2023 · 0 comments

Comments

@reubengann
Copy link

Hi, this template was very helpful, thank you.

One suggestion: I wanted to use this with Visual Studio, and so I needed to change a few things in CMakeLists.txt. I'm wondering if you would consider adding them, possibly.

Once I had set up an x64-Debug Configuration, I changed line 69 to be
set(BUILD_DIR ${PROJECT_SOURCE_DIR}/out/build/${VS_CONFIGURATION_TYPE})

On line 82, it seems like msvc is cd-ing into the executable folder, so I needed to change it to say to remove the ${BUILD_DIR}/ and just be

COMMAND ${QT6_DIR}/bin/windeployqt.exe ${TARGET_NAME}.exe

Finally, MSVC requires you pass /Zc:__cplusplus /permissive-. I just did this via setting the CMake flags

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus /permissive-")

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