mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-09 09:02:29 +02:00
glew to be linked statically so dll not required at runtime
This commit is contained in:
parent
1bd3529395
commit
b8a03cf0f4
3 changed files with 8 additions and 19 deletions
|
@ -5,7 +5,6 @@
|
|||
# GLEW_FOUND
|
||||
# GLEW_INCLUDE_DIRS
|
||||
# GLEW_LIBRARY
|
||||
# GLEW_WIN_DLL
|
||||
#
|
||||
|
||||
# Created on 2/6/2014 by Stephen Birarda
|
||||
|
@ -13,7 +12,7 @@
|
|||
# Adapted from FindGLEW.cmake available in the nvidia-texture-tools repository
|
||||
# (https://code.google.com/p/nvidia-texture-tools/source/browse/trunk/cmake/FindGLEW.cmake?r=96)
|
||||
|
||||
if (GLEW_INCLUDE_DIRS AND GLEW_LIBRARY AND (NOT WIN32 OR GLEW_WIN_DLL))
|
||||
if (GLEW_INCLUDE_DIRS AND GLEW_LIBRARY)
|
||||
set(GLEW_FOUND TRUE)
|
||||
else ()
|
||||
if (WIN32)
|
||||
|
@ -27,17 +26,11 @@ else ()
|
|||
set(WIN_ARCH_DIR "Win32")
|
||||
endif()
|
||||
|
||||
find_library(GLEW_LIBRARY glew32 PATH_SUFFIXES "lib/Release/${WIN_ARCH_DIR}" HINTS ${WIN_GLEW_SEARCH_DIRS})
|
||||
find_library(GLEW_WIN_DLL glew32 PATH_SUFFIXES "bin/Release/${WIN_ARCH_DIR}" HINTS ${WIN_GLEW_SEARCH_DIRS})
|
||||
find_library(GLEW_LIBRARY glew32s PATH_SUFFIXES "lib/Release/${WIN_ARCH_DIR}" HINTS ${WIN_GLEW_SEARCH_DIRS})
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if (WIN32)
|
||||
find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_INCLUDE_DIRS GLEW_LIBRARY GLEW_WIN_DLL)
|
||||
else ()
|
||||
find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_INCLUDE_DIRS GLEW_LIBRARY)
|
||||
endif()
|
||||
find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_INCLUDE_DIRS GLEW_LIBRARY)
|
||||
|
||||
if (GLEW_FOUND)
|
||||
if (NOT GLEW_FIND_QUIETLY)
|
||||
|
|
|
@ -23,7 +23,7 @@ else ()
|
|||
endif()
|
||||
|
||||
find_library(GLUT_glut_LIBRARY freeglut PATH_SUFFIXES lib/${WIN_ARCH_DIR} HINTS ${WIN_GLUT_SEARCH_DIRS})
|
||||
find_library(GLUT_WIN_DLL freeglut PATH_SUFFIXES bin/${WIN_ARCH_DIR} HINTS ${WIN_GLUT_SEARCH_DIRS})
|
||||
find_library(GLUT_WIN_DLL freeglut.dll PATH_SUFFIXES bin/${WIN_ARCH_DIR} HINTS ${WIN_GLUT_SEARCH_DIRS})
|
||||
else ()
|
||||
find_path(GLUT_INCLUDE_DIR GL/glut.h
|
||||
"${GLUT_LOCATION}/include"
|
||||
|
|
|
@ -148,9 +148,11 @@ endif (VISAGE_FOUND AND NOT DISABLE_VISAGE)
|
|||
if (LIBOVR_FOUND AND NOT DISABLE_LIBOVR)
|
||||
add_definitions(-DHAVE_LIBOVR)
|
||||
include_directories(SYSTEM "${LIBOVR_INCLUDE_DIRS}")
|
||||
|
||||
if (APPLE OR UNIX)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${LIBOVR_INCLUDE_DIRS}")
|
||||
endif (APPLE OR UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${LIBOVR_INCLUDE_DIRS}")
|
||||
endif ()
|
||||
|
||||
target_link_libraries(${TARGET_NAME} "${LIBOVR_LIBRARIES}")
|
||||
endif (LIBOVR_FOUND AND NOT DISABLE_LIBOVR)
|
||||
|
||||
|
@ -236,11 +238,5 @@ else (APPLE)
|
|||
${GLUT_WIN_DLL}
|
||||
$<TARGET_FILE_DIR:${TARGET_NAME}>
|
||||
)
|
||||
|
||||
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${GLEW_WIN_DLL}
|
||||
$<TARGET_FILE_DIR:${TARGET_NAME}>
|
||||
)
|
||||
endif()
|
||||
endif (APPLE)
|
||||
|
|
Loading…
Reference in a new issue