Enable simple OpenGL sample under Linux.

Thanks to Marcel Metz for the patch.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1206 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/5/head
klickverbot 2012-03-19 18:40:48 +00:00
parent 25fbc9989c
commit 3b0d2cbdb3
2 changed files with 17 additions and 4 deletions

View File

@ -137,10 +137,10 @@ SET ( BUILD_ASSIMP_TOOLS ON CACHE BOOL
IF ( BUILD_ASSIMP_TOOLS )
IF ( WIN32 )
ADD_SUBDIRECTORY( tools/assimp_view/ )
ADD_SUBDIRECTORY( samples/SimpleOpenGL/ )
ADD_SUBDIRECTORY( samples/SimpleTexturedOpenGL/ )
ENDIF ( WIN32 )
ADD_SUBDIRECTORY( tools/assimp_cmd/ )
ADD_SUBDIRECTORY( samples/SimpleOpenGL/ )
ENDIF ( BUILD_ASSIMP_TOOLS )
SET ( BUILD_TESTS OFF CACHE BOOL

View File

@ -1,13 +1,26 @@
FIND_PACKAGE(OpenGL)
FIND_PACKAGE(GLUT)
IF ( NOT GLUT_FOUND )
IF ( MSVC )
SET ( GLUT_FOUND 1 )
SET ( GLUT_INCLUDE_DIR ${Assimp_SOURCE_DIR}/samples/glut/ )
SET ( GLUT_LIBRARIES ${Assimp_SOURCE_DIR}/samples/glut/glut32.lib )
ELSE ( MSVC )
MESSAGE( WARNING "Please install glut." )
ENDIF ( MSVC )
ENDIF ( NOT GLUT_FOUND )
INCLUDE_DIRECTORIES(
${Assimp_SOURCE_DIR}/include
${Assimp_SOURCE_DIR}/code
${Assimp_SOURCE_DIR}/samples/glut/
${OPENGL_INCLUDE_DIR}
${GLUT_INCLUDE_DIR}
)
LINK_DIRECTORIES(
${Assimp_BINARY_DIR}
${Assimp_BINARY_DIR}/lib
${Assimp_SOURCE_DIR}/samples/glut/
)
ADD_EXECUTABLE( assimp_simpleogl
@ -16,7 +29,7 @@ ADD_EXECUTABLE( assimp_simpleogl
SET_PROPERTY(TARGET assimp_simpleogl PROPERTY DEBUG_POSTFIX ${DEBUG_POSTFIX})
TARGET_LINK_LIBRARIES( assimp_simpleogl assimp )
TARGET_LINK_LIBRARIES( assimp_simpleogl assimp ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} )
SET_TARGET_PROPERTIES( assimp_simpleogl PROPERTIES
OUTPUT_NAME assimp_simpleogl
)