gremlin/src/CMakeLists.txt

69 lines
1.2 KiB
CMake
Raw Normal View History

2011-01-12 22:05:22 +01:00
if (ENABLE_VIDEO)
# find external software
find_package(OpenGL)
# 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-12 22:05:22 +01:00
endif(ENABLE_VIDEO)
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-05 15:00:09 +01:00
main
game
2011-01-12 22:05:22 +01:00
Time
network
${VIDEO_SOURCES}
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
)
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-12 22:05:22 +01:00
if (ENABLE_VIDEO)
# 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
glfw spark
)
endif(ENABLE_VIDEO)