Commit 1b78fd76c776b0188178134ff61c65956bf25f34
1 parent
4f517c76
edited the FindGLUT cmake file to support 64-bit freeglut
Showing
2 changed files
with
20 additions
and
5 deletions
Show diff stats
CMakeLists.txt
@@ -44,7 +44,7 @@ include_directories( | @@ -44,7 +44,7 @@ include_directories( | ||
44 | ${OpenGL_INCLUDE_DIRS} | 44 | ${OpenGL_INCLUDE_DIRS} |
45 | ${GLUT_INCLUDE_DIR} | 45 | ${GLUT_INCLUDE_DIR} |
46 | ${STIM_INCLUDE_DIRS} | 46 | ${STIM_INCLUDE_DIRS} |
47 | - ${ANN_INCLUDE_DIR} | 47 | + ${ANN_INCLUDE_DIR} |
48 | ${Boost_INCLUDE_DIR} | 48 | ${Boost_INCLUDE_DIR} |
49 | ) | 49 | ) |
50 | 50 |
FindGLUT.cmake
@@ -47,11 +47,26 @@ | @@ -47,11 +47,26 @@ | ||
47 | if (WIN32) | 47 | if (WIN32) |
48 | find_path( GLUT_INCLUDE_DIR NAMES GL/glut.h | 48 | find_path( GLUT_INCLUDE_DIR NAMES GL/glut.h |
49 | PATHS $ENV{GLUT_ROOT_PATH}/include ) | 49 | PATHS $ENV{GLUT_ROOT_PATH}/include ) |
50 | - find_library( GLUT_glut_LIBRARY NAMES glut glut32 freeglut | ||
51 | - PATHS | ||
52 | - ${OPENGL_LIBRARY_DIR} | ||
53 | - $ENV{GLUT_ROOT_PATH}/lib | 50 | + |
51 | + if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) | ||
52 | + find_library( GLUT_glut_LIBRARY NAMES freeglut | ||
53 | + PATHS | ||
54 | + $ENV{GLUT_ROOT_PATH}/lib/x64 | ||
55 | + | ||
56 | + NO_DEFAULT_PATH | ||
57 | + ) | ||
58 | + message("GLUT 64-bit detected:") | ||
59 | + message(${GLUT_glut_LIBRARY}) | ||
60 | + else( CMAKE_SIZEOF_VOID_P EQUAL 8 ) | ||
61 | + find_library( GLUT_glut_LIBRARY NAMES glut glut32 freeglut | ||
62 | + PATHS | ||
63 | + ${OPENGL_LIBRARY_DIR} | ||
64 | + $ENV{GLUT_ROOT_PATH}/lib | ||
54 | ) | 65 | ) |
66 | + message("GLUT 32-bit detected") | ||
67 | + | ||
68 | + endif( CMAKE_SIZEOF_VOID_P EQUAL 8 ) | ||
69 | + | ||
55 | else () | 70 | else () |
56 | 71 | ||
57 | if (APPLE) | 72 | if (APPLE) |