Skip to content

Commit

Permalink
Fix some configuration issues in CMakeLists.txt on the Windows platform.
Browse files Browse the repository at this point in the history
  • Loading branch information
domchen committed Jan 15, 2025
1 parent bcbac5d commit ebda3df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,6 @@ elseif (IOS)
list(APPEND TGFX_SHARED_LIBS ${CoreText_LIBS})
find_library(CoreMedia_LIBS CoreMedia REQUIRED)
list(APPEND TGFX_SHARED_LIBS ${CoreMedia_LIBS})
find_library(CoreMedia_LIBS CoreMedia REQUIRED)
list(APPEND TGFX_SHARED_LIBS ${CoreMedia_LIBS})
find_library(ImageIO_LIBS ImageIO REQUIRED)
list(APPEND TGFX_SHARED_LIBS ${ImageIO_LIBS})
find_library(CORE_VIDEO CoreVideo)
Expand Down Expand Up @@ -405,9 +403,9 @@ elseif (ANDROID)

elseif (WIN32)
find_library(Bcrypt_LIB Bcrypt)
list(APPEND TGFX_SHARED_LIBS ${Bcrypt_LIB})
list(APPEND TGFX_STATIC_LIBS ${Bcrypt_LIB})
find_library(ws2_32_LIB ws2_32)
list(APPEND TGFX_SHARED_LIBS ${ws2_32_LIB})
list(APPEND TGFX_STATIC_LIBS ${ws2_32_LIB})
find_library(DWrite_LIB DWrite)
list(APPEND TGFX_STATIC_LIBS ${DWrite_LIB})

Expand All @@ -416,7 +414,7 @@ elseif (WIN32)

if (TGFX_USE_NATIVE_GL)
file(GLOB ANGLE_LIBS vendor/angle/${PLATFORM}/${ARCH}/*${CMAKE_STATIC_LIBRARY_SUFFIX})
list(APPEND GPU_PLATFORM_STATIC_LIBS ${ANGLE_LIBS})
list(APPEND TGFX_STATIC_LIBS ${ANGLE_LIBS})
list(APPEND TGFX_INCLUDES vendor/angle/include)
file(GLOB_RECURSE GPU_PLATFORM_FILES src/gpu/opengl/egl/*.*)
list(APPEND TGFX_FILES ${GPU_PLATFORM_FILES})
Expand Down
7 changes: 0 additions & 7 deletions win/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ else ()
endif ()

add_definitions(-DNOMINMAX -D_USE_MATH_DEFINES -DWIN32 -D_WINDOWS -D_CRT_SECURE_NO_WARNINGS)
find_library(Bcrypt_LIB Bcrypt)
list(APPEND HELLO_2D_LIBS ${Bcrypt_LIB})
find_library(ws2_32_LIB ws2_32)
list(APPEND HELLO_2D_LIBS ${ws2_32_LIB})
if (${CMAKE_SYSTEM_VERSION} VERSION_GREATER_EQUAL 6.3) # Windows 8.1 or later
add_definitions(-D_WIN32_WINNT=0x0603)
find_library(SHCORE_LIB SHCore)
Expand All @@ -34,10 +30,7 @@ else ()
list(APPEND HELLO_2D_LIBS ${USER32})
endif ()

file(GLOB ANGLE_LIBS ../vendor/angle/win/${ARCH}/*${CMAKE_STATIC_LIBRARY_SUFFIX})
list(APPEND HELLO_2D_LIBS ${ANGLE_LIBS})
list(APPEND HELLO_2D_INCLUDES ../vendor/angle/include)

file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/libEGL.dll)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../vendor/angle/win/${ARCH}/libEGL.dll DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/libGLESv2.dll)
Expand Down

0 comments on commit ebda3df

Please sign in to comment.