Improve installation
This commit is contained in:
@@ -2,8 +2,13 @@ find_package(SDL)
|
||||
find_package(OpenGL)
|
||||
find_package(GLUT)
|
||||
|
||||
if(SDL_FOUND)
|
||||
if(SDL_FOUND AND OPENGL_FOUND AND GLUT_FOUND)
|
||||
include_directories(../src ${SDL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIRS})
|
||||
add_executable(example-sdl sdl.c)
|
||||
target_link_libraries(example-sdl wiiuse ${SDL_LIBRARY} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
|
||||
|
||||
if(INSTALL_EXAMPLES)
|
||||
install(TARGETS example-sdl
|
||||
RUNTIME DESTINATION bin COMPONENT examples)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user