if (ENABLE_VIDEO) # find external software find_package(OpenGL) # set includes include_directories (${GREMLIN_SOURCE_DIR}/libs/glfw/include) include_directories (${GREMLIN_SOURCE_DIR}/libs/spark/include) SET(VIDEO_SOURCES Explosion oglfont Client) endif(ENABLE_VIDEO) include_directories (${GREMLIN_SOURCE_DIR}/libs/enet/include) include_directories (${GREMLIN_SOURCE_DIR}/src) # define executable add_executable( gremlin Application main game Time network ${VIDEO_SOURCES} ) # define executable add_executable( gremlin_dedicated Application main game Time network ${VIDEO_SOURCES} ) add_dependencies( gremlin enet ) if (WIN32) set(PLATFORM_LIBRARIES ws2_32 winmm) endif(WIN32) if(UNIX) set(PLATFORM_LIBRARIES pthread) endif(UNIX) target_link_libraries(gremlin enet ${PLATFORM_LIBRARIES} ) if (ENABLE_VIDEO) # set dependencies add_dependencies( gremlin glfw spark ) add_definitions(-DENABLE_VIDEO) if(UNIX) target_link_libraries(gremlin GL GLU X11 Xrandr ) endif(UNIX) target_link_libraries(gremlin glfw spark ) endif(ENABLE_VIDEO)