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
FindGLUT.cmake
... | ... | @@ -47,11 +47,26 @@ |
47 | 47 | if (WIN32) |
48 | 48 | find_path( GLUT_INCLUDE_DIR NAMES GL/glut.h |
49 | 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 | 70 | else () |
56 | 71 | |
57 | 72 | if (APPLE) | ... | ... |