33 lines
620 B
CMake
33 lines
620 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}/src)
|
|
|
|
|
|
# define executable
|
|
add_executable( gremlin
|
|
main
|
|
game
|
|
)
|
|
|
|
# set dependencies
|
|
add_dependencies( gremlin
|
|
glfw enet
|
|
)
|
|
|
|
if (WIN32)
|
|
set(PLATFORM_LIBRARIES ws2_32 winmm)
|
|
endif(WIN32)
|
|
|
|
if(UNIX)
|
|
set(PLATFORM_LIBRARIES GL X11 Xrandr -pthread)
|
|
endif(UNIX)
|
|
|
|
target_link_libraries(gremlin
|
|
glfw enet ${OPENGL_LIBRARY} ${PLATFORM_LIBRARIES}
|
|
)
|
|
|