Skip to content
Snippets Groups Projects
Commit 8232ce92 authored by Stéphane Albert's avatar Stéphane Albert
Browse files

MRG: Merged from origin/develop.

parents b383a0ee 6c9e1332
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,25 @@ INCLUDE_ONCE_MACRO(GLUT)
if(APPLE)
message(FATAL_ERROR "Cannot activate GLUT on OSX. See manits issue #1194")
retunr()
return()
endif()
SETUP_SUPERBUILD(GLUT)
if(UNIX)
set(GLUT_PATCH_COMMAND ${CMAKE_COMMAND}
-E copy
${CMAKE_SOURCE_DIR}/patches/GLUT/CMakeLists.txt
${GLUT_SB_SRC}
)
set(GLUT_CONFIGURE_COMMAND "${SB_ENV_CONFIGURE_CMD};${GLUT_SB_SRC}/configure" ${SB_CONFIGURE_ARGS})
else(MSVC)
set(GLUT_PATCH_COMMAND)
set(GLUT_CONFIGURE_COMMAND ${SB_CMAKE_COMMAND} ${SB_CMAKE_CACHE_ARGS})
endif()
ExternalProject_Add(GLUT
PREFIX GLUT
URL "http://downloads.sourceforge.net/project/freeglut/freeglut/2.8.1/freeglut-2.8.1.tar.gz"
......@@ -14,11 +28,8 @@ ExternalProject_Add(GLUT
BINARY_DIR ${GLUT_SB_BUILD_DIR}
INSTALL_DIR ${SB_INSTALL_PREFIX}
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
PATCH_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/patches/GLUT/CMakeLists.txt
${GLUT_SB_SRC}
CMAKE_CACHE_ARGS ${SB_CMAKE_CACHE_ARGS}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
PATCH_COMMAND ${GLUT_PATCH_COMMAND}
CONFIGURE_COMMAND ${GLUT_CONFIGURE_COMMAND}
)
set(_SB_GLUT_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
......
......@@ -68,6 +68,16 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/../CMakeLists.txt")
endif()
endif()
get_filename_component(PARENT_OF_BINARY_DIR ${CMAKE_BINARY_DIR} PATH)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (CMAKE_INSTALL_PREFIX
"${PARENT_OF_BINARY_DIR}/superbuild_install"
CACHE
PATH
"default install path for superbuild"
FORCE )
endif()
set(SB_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
file(TO_NATIVE_PATH "${SB_INSTALL_PREFIX}" SB_INSTALL_PREFIX_NATIVE)
......@@ -279,14 +289,17 @@ endif()
if(FROM_SYSTEM_LIST)
list(SORT FROM_SYSTEM_LIST)
foreach( item ${FROM_SYSTEM_LIST})
message(STATUS " Using system version of ${item}")
endforeach()
foreach( item ${FROM_SYSTEM_LIST})
message(STATUS " Using system version of ${item}")
endforeach()
endif()
if(FROM_SUPERBUILD_LIST)
list(SORT FROM_SUPERBUILD_LIST)
foreach( item ${FROM_SUPERBUILD_LIST})
message(STATUS " Using SuperBuild version of ${item}")
endforeach()
endif()
\ No newline at end of file
foreach( item ${FROM_SUPERBUILD_LIST})
message(STATUS " Using SuperBuild version of ${item}")
endforeach()
endif()
message(STATUS "SuperBuild will be installed to ${CMAKE_INSTALL_PREFIX}")
message(STATUS "To install to a different directory, re-run cmake -DCMAKE_INSTALL_PREFIX=/your/preferred/path")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment