Skip to content

Commit

Permalink
Use built-in support for external CMake subproject for GLEW
Browse files Browse the repository at this point in the history
Requires 3.7 as GLEW contains CMake project not in root directory
  • Loading branch information
o01eg committed May 18, 2022
1 parent 79ac4ff commit 508bcdf
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
if(WIN32)
set(REQUIRED_CMAKE_VERSION 3.4)
else()
set(REQUIRED_CMAKE_VERSION 3.2)
endif()
set(REQUIRED_CMAKE_VERSION 3.7)

cmake_minimum_required(VERSION ${REQUIRED_CMAKE_VERSION})

Expand Down Expand Up @@ -502,8 +498,7 @@ ExternalProject_Add(glew
URL_MD5 ${GLEW_MD5}
DOWNLOAD_DIR ${SDK_DOWNLOAD_DIR}
${GLEW_PATCHSET}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G "${CMAKE_GENERATOR}"
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
Expand All @@ -512,7 +507,7 @@ ExternalProject_Add(glew
-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES_}
-DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE}
-DBUILD_UTILS=OFF
<SOURCE_DIR>/build/cmake/
SOURCE_SUBDIR build/cmake
INSTALL_DIR ${SDK_INSTALL_DIR}
)
list(APPEND DIST_PACK_TARGETS glew)
Expand Down

0 comments on commit 508bcdf

Please sign in to comment.