35 lines
828 B
CMake
35 lines
828 B
CMake
cmake_minimum_required (VERSION 2.6)
|
|
project (GREMLIN C CXX)
|
|
|
|
if (MSVC)
|
|
add_definitions(/D_USE_MATH_DEFINES)
|
|
endif(MSVC)
|
|
|
|
if (WIN32)
|
|
set(PLATFORM_LIBRARIES ws2_32 winmm)
|
|
endif(WIN32)
|
|
|
|
if(UNIX)
|
|
set(PLATFORM_LIBRARIES pthread)
|
|
endif(UNIX)
|
|
|
|
include_directories (${GREMLIN_SOURCE_DIR}/libs/glfw/include)
|
|
include_directories (${GREMLIN_SOURCE_DIR}/libs/spark/include)
|
|
include_directories (${GREMLIN_SOURCE_DIR}/libs/enet/include)
|
|
include_directories (${GREMLIN_SOURCE_DIR}/libs/bullet)
|
|
|
|
find_package(OpenGL)
|
|
|
|
add_subdirectory (libs/enet)
|
|
add_subdirectory (libs/pugixml)
|
|
add_subdirectory (libs/bullet)
|
|
add_subdirectory (src/common)
|
|
add_subdirectory (src/server)
|
|
|
|
if (OPENGL_FOUND)
|
|
add_subdirectory (libs/glfw)
|
|
add_subdirectory (libs/spark)
|
|
add_subdirectory (src/client)
|
|
endif(OPENGL_FOUND)
|
|
|