forked from CloudCompare/CloudCompare
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeExternalLibs.cmake
42 lines (36 loc) · 1.57 KB
/
CMakeExternalLibs.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# ------------------------------------------------------------------------------
# Qt
# ------------------------------------------------------------------------------
set( DESIRED_QT_VERSION 4 )
if ( MSVC )
#We need QtMain to use 'WIN32' mode (/subsystem:windows) with MSVC
find_package( Qt4 ${QT_VERSION} COMPONENTS QtMain QtCore QtGui QtOpenGL REQUIRED )
else()
find_package( Qt4 ${QT_VERSION} COMPONENTS QtCore QtGui QtOpenGL REQUIRED )
endif()
if( NOT QT_FOUND )
message( SEND_ERROR "Qt required, but not found with 'find_package()'" )
else()
include( ${QT_USE_FILE} )
endif()
# ------------------------------------------------------------------------------
# OpenGL
# ------------------------------------------------------------------------------
find_package( OpenGL REQUIRED )
if( NOT OPENGL_FOUND )
message( SEND_ERROR "OpenGL required, but not found with 'find_package()'" )
endif()
# ------------------------------------------------------------------------------
# CUDA
# ------------------------------------------------------------------------------
#if( USE_CUDA )
# find_package( CUDA REQUIRED )
# if( NOT CUDA_FOUND )
# message( SEND_ERROR "CUDA required, but not found with 'find_package()'" )
# endif()
#endif()
# ------------------------------------------------------------------------------
# Global variables
# ------------------------------------------------------------------------------
list( APPEND EXTERNAL_LIBS_INCLUDE_DIR ${QT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} )
list( APPEND EXTERNAL_LIBS_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES} )