Skip to content

Commit

Permalink
Move WindowsStore setting after project().
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCallow committed Jul 27, 2024
1 parent 84dcaad commit 0afbf54
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,6 @@ if(WIN32)
# KTX_DEPENDENT_VARIABLE won't work. Force disable signing.
unset(CODE_SIGN_KEY_VAULT CACHE)
endif()

# Windows Store Compatibility
if (${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore")
# Disable OpenGL upload on Universal Windows Platform
set(KTX_FEATURE_GL_UPLOAD OFF)
endif()
endif()

set(bitness 64)
Expand All @@ -210,6 +204,9 @@ project(KTX-Software
DESCRIPTION "Libraries and tools to create and read KTX image texture files."
)

include(GNUInstallDirs) # Must be after project.
include(CTest) # "

CMAKE_DEPENDENT_OPTION( BASISU_SUPPORT_OPENCL
"Compile with OpenCL support so applications can choose to use it."
OFF
Expand All @@ -218,7 +215,7 @@ CMAKE_DEPENDENT_OPTION( BASISU_SUPPORT_OPENCL
)

if(BASISU_SUPPORT_OPENCL)
find_package(OpenCL)
find_package(OpenCL) # Must be after project as needs language defined.
endif()

if(BASISU_SUPPORT_OPENCL AND WIN32 AND NOT OpenCL_FOUND)
Expand All @@ -236,8 +233,13 @@ if(BASISU_SUPPORT_OPENCL AND WIN32 AND NOT OpenCL_FOUND)
set(OpenCL_LIBRARIES ${OpenCL_LIBRARY})
endif()

include(GNUInstallDirs) # Must be after project.
include(CTest) # "
# Windows Store Compatibility.
# In this case CMAKE_SYSTEM_NAME is not set until after project.
if (${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore")
# Disable OpenGL upload on Universal Windows Platform
set(KTX_FEATURE_GL_UPLOAD OFF)
endif()

# Uses IOS, so included after project to avoid modifying it.
if(KTX_GENERATE_VK_FILES)
include(cmake/mkvk.cmake)
Expand Down

0 comments on commit 0afbf54

Please sign in to comment.