The find_package command automatically sets up the necessary preprocessor definitions, and also sets up other configurations for its linked target.
I want a way to exclude some compile definitions inherited from the linked library.
Example:
CMakelists.txt
cmake_minimum_required(VERSION 3.27)
project(qt_opengl_test)
find_package(Qt6 COMPONENTS OpenGL OpenGLWidgets REQUIRED QUIET)
link_libraries(Qt6::OpenGL Qt6::OpenGLWidgets)
add_executable(“proj1” main.cpp)
Qt OpenGL adds (WIN32, _ENABLE_EXTENDED_ALIGNED_STORAGE, WIN64, and _WIN64) compile definitions to Proj1, how can I prevent this from happening?