Bug 5376426: Update README and CMakeLists.txt for freeglut and glew on WOA

This commit is contained in:
shawnz
2025-07-11 10:50:57 +08:00
parent 1a35902577
commit 555353b4b5
22 changed files with 178 additions and 43 deletions

View File

@@ -22,6 +22,12 @@ include_directories(../../../Common)
if(WIN32)
set(PC_GLUT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common")
set(PC_GLUT_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/lib/x64")
# The GLEW library built on Windows on Arm system is named as glew32.lib/glew32.dll by default.
if(EXISTS "${PC_GLUT_LIBRARY_DIRS}/glew32.lib")
set(GLEW_LIB_NAME "glew32")
else()
set(GLEW_LIB_NAME "glew64")
endif()
endif()
@@ -62,7 +68,7 @@ target_compile_features(oceanFFT PRIVATE cxx_std_17 cuda_std_17)
if(WIN32)
target_link_libraries(oceanFFT
${PC_GLUT_LIBRARY_DIRS}/freeglut.lib
${PC_GLUT_LIBRARY_DIRS}/glew64.lib
${PC_GLUT_LIBRARY_DIRS}/${GLEW_LIB_NAME}.lib
)
add_custom_command(TARGET oceanFFT
@@ -75,7 +81,7 @@ target_compile_features(oceanFFT PRIVATE cxx_std_17 cuda_std_17)
add_custom_command(TARGET oceanFFT
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/glew64.dll
${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/win64/$<CONFIGURATION>/${GLEW_LIB_NAME}.dll
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>
)
endif()