cmake_minimum_required(VERSION 2.6)
project(iwor)
# Set version information.
set(VERSION_MAJOR 0)
set(VERSION_MINOR 1)
set(VERSION_REV 1)
set(VERSION_FULL ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV})
# Set various cache (user adjustable) settings.
set(DOCS ON CACHE BOOL "Install documentation")
set(EXAMPLES ON CACHE BOOL "Build and install examples (recommended)")
set(TEST ON CACHE BOOL "Enable regression testing")
# Enable regression testing (if enabled).
if(TEST)
enable_testing()
endif(TEST)
# Set configuration file.
configure_file(
"${PROJECT_SOURCE_DIR}/include/config.h.in"
"${PROJECT_BINARY_DIR}/config.h"
)
# Tell the compiler where to find the header files.
include_directories(include/)
include_directories("${PROJECT_BINARY_DIR}")
# Build the server and the ncurses GUI.
add_subdirectory(src/)
# Install documentation (if enabled).
if(DOCS)
install(DIRECTORY doc/ DESTINATION share/doc/iwor/)
endif(DOCS)
# Build example robots (if enabled).
if(EXAMPLES)
install(DIRECTORY examples/ DESTINATION share/examples/iwor/)
add_subdirectory(examples/robots/)
endif(EXAMPLES)
# Build the Java GUI.
#add_subdirectory(java-gui/)