cmake_minimum_required(VERSION 2.6)
+if(NOT CMAKE_BUILD_TYPE)\r
+ set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING\r
+ "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel"\r
+ FORCE)\r
+endif(NOT CMAKE_BUILD_TYPE)
+
+if(NOT LUGARU_INSTALL_PREFIX)
+ if(WIN32)
+ set(LUGARU_INSTALL_PREFIX C:\Lugaru CACHE PATH
+ "LUGARU_INSTALL_PREFIX: Install path prefix, prepended onto install directories."
+ FORCE)
+ else(WIN32)
+ set(LUGARU_INSTALL_PREFIX /usr/local/lugaru CACHE PATH
+ "CMAKE_INSTALL_PREFIX: Install path prefix, prepended onto install directories."
+ FORCE)
+ endif(WIN32)
+endif(NOT LUGARU_INSTALL_PREFIX)
+
+set(CMAKE_INSTALL_PREFIX "${LUGARU_INSTALL_PREFIX}" CACHE INTERNAL "Prefix
+prepended to install directories" FORCE)
+
+
+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(OpenAL REQUIRED)
find_package(BZip2 REQUIRED)
set(LUGARU_LIBS ${OPENAL_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${SDL_LIBRARY} ${GLU_LIBRARY} ${OPENGL_LIBRARY} ${VORBISFILE_LIBS} ${OGG_LIBS})
add_subdirectory(Source)
+
+# Install target
+if(WIN32)
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/Source/lugaru.exe DESTINATION ${CMAKE_INSTALL_PREFIX})
+else(WIN32)
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/Source/lugaru DESTINATION ${CMAKE_INSTALL_PREFIX})
+endif(WIN32)
+
+install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data DESTINATION ${CMAKE_INSTALL_PREFIX})
+