gremlin/src/CMakeLists.txt

76 lines
1.3 KiB
CMake
Raw Normal View History

2011-01-14 22:02:36 +01:00
if (OPENGL_FOUND)
2011-01-12 22:05:22 +01:00
# find external software
2011-01-14 22:02:36 +01:00
2011-01-12 22:05:22 +01:00
# set includes
include_directories (${GREMLIN_SOURCE_DIR}/libs/glfw/include)
include_directories (${GREMLIN_SOURCE_DIR}/libs/spark/include)
2011-01-14 14:59:18 +01:00
SET(VIDEO_SOURCES Explosion oglfont Client)
2011-01-14 22:02:36 +01:00
endif(OPENGL_FOUND)
2011-01-04 18:11:59 +01:00
include_directories (${GREMLIN_SOURCE_DIR}/libs/enet/include)
include_directories (${GREMLIN_SOURCE_DIR}/src)
# define executable
add_executable( gremlin
2011-01-14 14:59:18 +01:00
Application
main
game
Time
network
${VIDEO_SOURCES}
)
# 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
network
2011-01-04 18:11:59 +01:00
)
add_dependencies( gremlin
2011-01-12 22:05:22 +01:00
enet
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
if (WIN32)
set(PLATFORM_LIBRARIES ws2_32 winmm)
endif(WIN32)
if(UNIX)
2011-01-12 22:05:22 +01:00
set(PLATFORM_LIBRARIES pthread)
2011-01-04 18:11:59 +01:00
endif(UNIX)
target_link_libraries(gremlin
2011-01-12 22:05:22 +01:00
enet ${PLATFORM_LIBRARIES}
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)