Created
July 7, 2021 07:42
-
-
Save navono/d8c86fe25e62428f2045cf8683695b93 to your computer and use it in GitHub Desktop.
CMake include Windows SDK path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include(FindWindowsSDK) | |
if (NOT WINDOWSSDK_FOUND) | |
message("Windows SDK not found") | |
endif() | |
get_windowssdk_include_dirs(${WINDOWSSDK_LATEST_DIR} WINDOWSSDK_INCLUDE_DIRS) | |
# message(${WINDOWSSDK_INCLUDE_DIRS}) | |
target_include_directories(${TARGET} INTERFACE ${WINDOWSSDK_INCLUDE_DIRS}) | |
set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE /SAFESEH:NO") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment