2015-05-19 03:44:54 +00:00
|
|
|
FIND_PACKAGE(OpenGL)
|
|
|
|
FIND_PACKAGE(GLUT)
|
|
|
|
|
|
|
|
IF ( NOT GLUT_FOUND )
|
|
|
|
IF ( MSVC )
|
|
|
|
SET ( GLUT_FOUND 1 )
|
2019-02-07 16:09:05 +00:00
|
|
|
SET ( GLUT_INCLUDE_DIR ${Assimp_SOURCE_DIR}/samples/freeglut/ )
|
|
|
|
SET ( GLUT_LIBRARIES ${Assimp_SOURCE_DIR}/samples/freeglut/lib/freeglut.lib )
|
2020-02-23 12:09:35 +00:00
|
|
|
ELSE ()
|
2015-05-19 03:44:54 +00:00
|
|
|
MESSAGE( WARNING "Please install glut." )
|
2020-02-23 12:09:35 +00:00
|
|
|
ENDIF ()
|
|
|
|
ENDIF ()
|
2015-05-19 03:44:54 +00:00
|
|
|
|
2017-09-24 09:29:43 +00:00
|
|
|
if ( MSVC )
|
|
|
|
ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
|
|
|
|
ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
|
2020-02-23 12:09:35 +00:00
|
|
|
endif ()
|
2017-09-24 09:29:43 +00:00
|
|
|
|
2015-05-19 03:44:54 +00:00
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${Assimp_SOURCE_DIR}/code
|
|
|
|
${OPENGL_INCLUDE_DIR}
|
|
|
|
${GLUT_INCLUDE_DIR}
|
2020-03-06 15:26:51 +00:00
|
|
|
${SAMPLES_SHARED_CODE_DIR}
|
2015-05-19 03:44:54 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
LINK_DIRECTORIES(
|
|
|
|
${Assimp_BINARY_DIR}
|
|
|
|
${Assimp_BINARY_DIR}/lib/
|
|
|
|
)
|
|
|
|
|
|
|
|
ADD_EXECUTABLE( assimp_simpletexturedogl WIN32
|
|
|
|
SimpleTexturedOpenGL/src/model_loading.cpp
|
2020-03-06 15:26:51 +00:00
|
|
|
${SAMPLES_SHARED_CODE_DIR}/UTFConverter.cpp
|
|
|
|
${SAMPLES_SHARED_CODE_DIR}/UTFConverter.h
|
2015-05-19 03:44:54 +00:00
|
|
|
)
|
|
|
|
|
2020-08-07 20:04:39 +00:00
|
|
|
TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp_simpletexturedogl)
|
|
|
|
|
2015-05-19 03:44:54 +00:00
|
|
|
SET_PROPERTY(TARGET assimp_simpletexturedogl PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
|
|
|
|
2020-02-15 23:02:12 +00:00
|
|
|
TARGET_LINK_LIBRARIES( assimp_simpletexturedogl assimp ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} )
|
2015-05-19 03:44:54 +00:00
|
|
|
|
|
|
|
SET_TARGET_PROPERTIES( assimp_simpletexturedogl PROPERTIES
|
|
|
|
OUTPUT_NAME assimp_simpletexturedogl
|
|
|
|
)
|
|
|
|
|
|
|
|
INSTALL( TARGETS assimp_simpletexturedogl
|
|
|
|
DESTINATION "${ASSIMP_BIN_INSTALL_DIR}" COMPONENT assimp-dev
|
|
|
|
)
|
2020-03-31 17:35:19 +00:00
|
|
|
|