Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
PaddleStroke committed Feb 4, 2025
1 parent ca85fd5 commit 5cdd2ef
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/Gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ if(MSVC)
endif(MSVC)

if(MSVC)
set(FreeCADGui_LIBS
FreeCADApp
${OPENGL_gl_LIBRARY}
)

# Find the latest Windows SDK version dynamically
file(GLOB WINDOWS_SDK_VERSIONS "C:/Program Files (x86)/Windows Kits/10/Lib/10.*")
list(SORT WINDOWS_SDK_VERSIONS COMPARE NATURAL ORDER DESCENDING) # Sort in descending order
Expand All @@ -88,12 +83,12 @@ if(MSVC)
message(FATAL_ERROR "Windows SDK not found in expected location: ${WINDOWS_SDK_PATH}")
endif()

find_library(DWMAPI_LIB Dwmapi)
if(DWMAPI_LIB)
list(APPEND FreeCADGui_LIBS ${DWMAPI_LIB})
else()
message(FATAL_ERROR "Dwmapi.lib not found. Ensure Windows SDK is installed.")
endif()
set(FreeCADGui_LIBS
FreeCADApp
${OPENGL_gl_LIBRARY}
"${WINDOWS_SDK_PATH}/um/x64/dwmapi.lib" # Use the found path
user32
)

if(FREECAD_USE_3DCONNEXION_LEGACY)
list(APPEND FreeCADGui_LIBS
Expand Down

0 comments on commit 5cdd2ef

Please sign in to comment.