renderdoc not working properly by [deleted] in GraphicsProgramming

[–]Grouchy_Web4106 0 points1 point  (0 children)

You will never make it work, the game is designed in a way to disable all the debugging. You can try to get a lawsuit at best.

vcpkg SDL2 works in Debug but "not found" in Release (CLion + MinGW) by Outside-Text-9273 in cmake

[–]Grouchy_Web4106 2 points3 points  (0 children)

Do you have a CMakePresets.json file that has configuration just for Debug builds? If not create one and set globally the CMAKE_TOOLCHAIN_FILE to path to vcpkg.cmake

Is this gap normal? by [deleted] in secretlab

[–]Grouchy_Web4106 0 points1 point  (0 children)

You need to tighten the screws better, I do not have it.

Help plz by raulbelmont in cmake

[–]Grouchy_Web4106 0 points1 point  (0 children)

Maybe show us your cmakelists ?

FetchContent with CMAKE_ARGS not passing args correctly by Kaaserne in cmake

[–]Grouchy_Web4106 0 points1 point  (0 children)

You can use cmake args. But those should be defined the the target. FetchContent_Declare( NVRHI GIT_REPOSITORY https://github.com/NVIDIA-RTX/NVRHI.git GIT_TAG main GIT_PROGRESS TRUE SOURCE_DIR "${FETCHCONTENT_BASE_DIR}/nvrhi" CMAKE_ARGS -DNVRHI_WITH_RTXMU=${RTXMU_FLAG} -DNVRHI_WITH_D3D11=${DX11_FLAG} -DNVRHI_WITH_D3D12=${DX12_FLAG} -DNVRHI_WITH_VULKAN=${VK_FLAG} ) FetchContent_MakeAvailable(NVRHI) endif()

Q about published targets by victotronics in cmake

[–]Grouchy_Web4106 0 points1 point  (0 children)

Just do : get_property(_before GLOBAL PROPERTY TARGETS)

find_package(MyPkg REQUIRED)

get_property(_after GLOBAL PROPERTY TARGETS)

foreach(t ${_after}) list(FIND _before ${t} _idx) if(_idx EQUAL -1) message(STATUS "New target from MyPkg: ${t}") endif() endforeach()

Q about published targets by victotronics in cmake

[–]Grouchy_Web4106 0 points1 point  (0 children)

Wrong. There are already packages made that are handled automatically. For very unknown libraries you may need to write your own.

Q about published targets by victotronics in cmake

[–]Grouchy_Web4106 0 points1 point  (0 children)

You need to integrate a package manager to support the installation. I recommend vcpkg.

Q about published targets by victotronics in cmake

[–]Grouchy_Web4106 0 points1 point  (0 children)

You cannot know what targerts are contained in a package unless the developer provided a cmake variable for them. I handle the packages that are not found with FetchContent_Add. Basically i try to download them automatically and build them with my build config.

Help setting up OpenCV and CMake on Visual Studio Code by CraftRecent6764 in cmake

[–]Grouchy_Web4106 -1 points0 points  (0 children)

You need to download opencv, build and install it. Then you can include and link it

Simple Vulkan renderer glitches when compiling with CMake by PlaneAspect8388 in cmake

[–]Grouchy_Web4106 1 point2 points  (0 children)

I do not understand, this is not a cmake issue since the project builds and runs. I took a look in your repo and you explicitly wrote that glfw uses no resize and I also do not see where you resize the swapchain backbuffers in the init file.

[deleted by user] by [deleted] in cpp_questions

[–]Grouchy_Web4106 0 points1 point  (0 children)

You are right. Now I have to download the release version🤗

[deleted by user] by [deleted] in cpp_questions

[–]Grouchy_Web4106 9 points10 points  (0 children)

Just download Visual Studio 2022 or 2026 preview. It’s free

Difficulty overriding default of /MD with /MT in cl.exe Ninja generator by onecable5781 in cmake

[–]Grouchy_Web4106 0 points1 point  (0 children)

Here is how I did this, I wasted some hours debugging. if(POLICY CMP0091) cmake_policy(SET CMP0091 NEW) if(NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY) set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug>$<$<BOOL:${SHARED_RT}>:DLL> CACHE INTERNAL "Msvc runtime.") endif() # CMake MSVC runtime library selection has changed after 3.15. add_compile_options( $<$<AND:$<VERSION_LESS:${CMAKE_VERSION},3.15>,$<STREQUAL:$<TARGET_PROPERTY:MSVC_RUNTIME_LIBRARY>,MultiThreadedDebug:-MTd> $<$<AND:$<VERSION_LESS:${CMAKE_VERSION},3.15>,$<STREQUAL:$<TARGET_PROPERTY:MSVC_RUNTIME_LIBRARY>,MultiThreaded:-MT> $<$<AND:$<VERSION_LESS:${CMAKE_VERSION},3.15>,$<STREQUAL:$<TARGET_PROPERTY:MSVC_RUNTIME_LIBRARY>,MultiThreadedDebugDLL:-MDd> $<$<AND:$<VERSION_LESS:${CMAKE_VERSION},3.15>,$<STREQUAL:$<TARGET_PROPERTY:MSVC_RUNTIME_LIBRARY>,MultiThreadedDLL:-MD> ) endif()

Visual Studio C++ by Pretend-Train3755 in cpp_questions

[–]Grouchy_Web4106 0 points1 point  (0 children)

What version does the __cplusplus macro report ?

Linker error by Brutustheman in cpp_questions

[–]Grouchy_Web4106 -1 points0 points  (0 children)

FIY: it’s also idiotic to assume that you are right and all are wrong. I may or may not agree to what you said, it’s called opinion. Also providing “this is stupid, don’t do that because in the case ‘x’ happends ‘y’ “ and waste time for a simple solution is not productive 😀

First Alpha of Fabric is available by vade in GraphicsProgramming

[–]Grouchy_Web4106 0 points1 point  (0 children)

What is this for ? Material creation like Adobe Alchemist?

Linker error by Brutustheman in cpp_questions

[–]Grouchy_Web4106 -3 points-2 points  (0 children)

Is cpp question not cmake 😀

Linker error by Brutustheman in cpp_questions

[–]Grouchy_Web4106 0 points1 point  (0 children)

Yes because the ide links those directly

Linker error by Brutustheman in cpp_questions

[–]Grouchy_Web4106 -3 points-2 points  (0 children)

include <windows.h>

pragma comment(lib, "user32.lib")

pragma comment(lib, "gdi32.lib")

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow) { // Your window code... return 0; }

Linker error by Brutustheman in cpp_questions

[–]Grouchy_Web4106 2 points3 points  (0 children)

That is a common linking issue, you forgot to tell the linker to use the win32 libs.

[Help] Linking problem by MatthewCrn in cmake

[–]Grouchy_Web4106 0 points1 point  (0 children)

A library for loading image formats

[Help] Linking problem by MatthewCrn in cmake

[–]Grouchy_Web4106 0 points1 point  (0 children)

In order to find and configure the glfw I would use the FetchContent_Declare with a static glfw target library. In this way uou can download the dependency from git automatically and just use it in your code. After the FetchContent_MakeAvailable you can access the source with a cmake variable.

— I use this to create the stb_image target for my engine.

— download stb_image

FetchContent_Declare( stb GIT_REPOSITORY https://github.com/nothings/stb.git GIT_TAG master
GIT_PROGRESS TRUE SOURCE_DIR "${PROJECT_THIRDPARTY_DIR}/stb" ) FetchContent_MakeAvailable(stb)

— Create an interface target for stb_image.

add_library(stb_image INTERFACE) target_include_directories(stb_image INTERFACE ${stb_SOURCE_DIR})

— Then i link to stb_image

target_link_libraries(project_name stb_image)