Commit d361b47a authored by Guillaume Pasero's avatar Guillaume Pasero

SuperBuild: get glfw and glut back in superbuild

parent 0bf4178a
set(proj GLFW)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
message(STATUS "Setup glfw...")
if(USE_SYSTEM_GLFW)
message(STATUS " Using glfw system version")
else()
set(${proj}_DEPENDENCIES)
set(GLFW_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${proj}/build)
set(GLFW_SB_SRC ${CMAKE_BINARY_DIR}/${proj}/src/${proj})
ExternalProject_Add(${proj}
PREFIX ${proj}
URL "https://github.com/glfw/glfw/releases/download/3.1.2/glfw-3.1.2.zip"
URL_MD5 8023327bfe979b3fe735e449e2f54842
BINARY_DIR ${GLFW_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
-DGLFW_BUILD_EXAMPLES:BOOL=OFF
-DGLFW_BUILD_DOCS:BOOL=OFF
-DGLFW_BUILD_TESTS:BOOL=OFF
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
)
set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/libglfw.lib)
elseif(UNIX)
set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/libglfw${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
message(STATUS " Using glfw SuperBuild version")
endif()
endif()
set(proj GLUT)
if(NOT __EXTERNAL_${proj}__)
set(__EXTERNAL_${proj}__ 1)
message(STATUS "Setup glut...")
if(USE_SYSTEM_GLUT)
message(STATUS " Using glut system version")
else()
set(${proj}_DEPENDENCIES)
set(GLUT_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${proj}/build)
set(GLUT_SB_SRC ${CMAKE_BINARY_DIR}/${proj}/src/${proj})
ExternalProject_Add(${proj}
PREFIX ${proj}
URL "http://downloads.sourceforge.net/project/freeglut/freeglut/2.8.1/freeglut-2.8.1.tar.gz"
URL_MD5 918ffbddcffbac83c218bc52355b6d5a
BINARY_DIR ${GLUT_SB_BUILD_DIR}
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/${proj}/CMakeLists.txt ${GLUT_SB_SRC}
CMAKE_CACHE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
)
set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/libfreeglut.lib)
elseif(UNIX)
set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/libfreeglut${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
message(STATUS " Using glut SuperBuild version")
endif()
endif()
......@@ -13,7 +13,8 @@ else()
add_definitions(-DFREEGLUT_STATIC)
endif()
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_definitions(-DHAVE_FCNTL_H)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
set(FREEGLUT_SRCS ${FREEGLUT_SRC_DIR}/freeglut_callbacks.c
${FREEGLUT_SRC_DIR}/freeglut_cursor.c
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment