gremlin/src/CMakeLists.txt

78 lines
1.3 KiB
CMake
Raw Normal View History

2011-01-16 23:02:40 +01:00
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}/src)
if (MSVC)
add_definitions(/D_USE_MATH_DEFINES)
endif(MSVC)
2011-01-12 22:05:22 +01:00
2011-01-16 23:02:40 +01:00
if (WIN32)
set(PLATFORM_LIBRARIES ws2_32 winmm)
endif(WIN32)
if(UNIX)
set(PLATFORM_LIBRARIES pthread)
endif(UNIX)
if (OPENGL_FOUND)
2011-01-12 22:05:22 +01:00
2011-01-14 14:59:18 +01:00
SET(VIDEO_SOURCES Explosion oglfont Client)
2011-01-04 18:11:59 +01:00
2011-01-16 23:02:40 +01:00
# define executable
add_executable( gremlin
Application
main
game
Time
Network
${VIDEO_SOURCES}
)
2011-01-04 18:11:59 +01:00
2011-01-16 23:02:40 +01:00
add_dependencies( gremlin
enet
)
target_link_libraries(gremlin
enet ${PLATFORM_LIBRARIES}
)
endif(OPENGL_FOUND)
2011-01-14 14:59:18 +01:00
# define executable
add_executable( gremlin_dedicated
Application
2011-01-14 21:09:14 +01:00
server
2011-01-05 15:00:09 +01:00
game
2011-01-12 22:05:22 +01:00
Time
2011-01-16 23:02:40 +01:00
Network
2011-01-04 18:11:59 +01:00
)
2011-01-14 21:09:14 +01:00
add_dependencies( gremlin_dedicated
enet
)
2011-01-04 18:11:59 +01:00
2011-01-14 21:09:14 +01:00
target_link_libraries(gremlin_dedicated
enet ${PLATFORM_LIBRARIES}
)
2011-01-14 22:02:36 +01:00
if (OPENGL_FOUND)
2011-01-12 22:05:22 +01:00
# 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
2011-01-14 22:39:27 +01:00
glfw spark ${OPENGL_LIBRARIES}
2011-01-12 22:05:22 +01:00
)
2011-01-14 22:02:36 +01:00
endif(OPENGL_FOUND)