gremlin/src/CMakeLists.txt

36 lines
724 B
CMake

# find external software
find_package(OpenGL)
# set includes
include_directories (${GREMLIN_SOURCE_DIR}/libs/glfw/include)
include_directories (${GREMLIN_SOURCE_DIR}/libs/enet/include)
include_directories (${GREMLIN_SOURCE_DIR}/libs/spark/include)
include_directories (${GREMLIN_SOURCE_DIR}/src)
# define executable
add_executable( gremlin
main
game
Explosion
oglfont
)
# set dependencies
add_dependencies( gremlin
glfw enet spark
)
if (WIN32)
set(PLATFORM_LIBRARIES ws2_32 winmm)
endif(WIN32)
if(UNIX)
set(PLATFORM_LIBRARIES GL X11 Xrandr pthread asound)
endif(UNIX)
target_link_libraries(gremlin
glfw enet spark ${OPENGL_LIBRARY} ${PLATFORM_LIBRARIES}
)