dfhack/CMakeLists.txt

43 lines
1.8 KiB
CMake

2009-09-13 18:02:46 -06:00
# main project file. use it from a build sub-folder, see COMPILE for details
PROJECT (dfhack)
2009-09-13 18:02:46 -06:00
cmake_minimum_required(VERSION 2.6)
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
2009-09-13 18:02:46 -06:00
# disable warning, autosearch
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
message(SEND_ERROR "In-source builds are not allowed.")
endif("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
IF(NOT DEFINED CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
ENDIF(NOT DEFINED CMAKE_BUILD_TYPE)
SET(SO_MAJOR_VERSION "0")
SET(SO_MINOR_VERSION "0")
SET(SO_BUILD_VERSION "1")
SET(SO_VERSION "${SO_MAJOR_VERSION}.${SO_MINOR_VERSION}.${SO_BUILD_VERSION}")
SET( LIBRARY_OUTPUT_PATH ${dfhack_SOURCE_DIR}/output CACHE PATH "Output directory for the dfhack library" )
SET( EXECUTABLE_OUTPUT_PATH ${dfhack_SOURCE_DIR}/output CACHE PATH "Output directory for the dfhack tools" )
2010-02-27 20:11:06 -07:00
SET( CMAKE_SWIG_OUTDIR ${dfhack_SOURCE_DIR}/output CACHE PATH "Global output directory for swig generated language wrappers" )
2009-09-13 18:02:46 -06:00
2010-04-02 09:27:35 -06:00
include_directories (${CMAKE_SOURCE_DIR}/dfhack/include/)
include_directories (${CMAKE_SOURCE_DIR}/dfhack/shm/)
2010-04-02 09:56:38 -06:00
include_directories (${CMAKE_SOURCE_DIR}/dfhack/depends/md5/)
include_directories (${CMAKE_SOURCE_DIR}/dfhack/depends/tinyxml/)
include_directories (${CMAKE_SOURCE_DIR}/dfhack/depends/argstream/)
2009-09-13 18:02:46 -06:00
2010-04-02 08:46:33 -06:00
add_subdirectory (dfhack)
2010-04-04 07:24:50 -06:00
#add_subdirectory (dfhack/shm)
#FIXME: add exports for MSVC
#add_subdirectory (dfhack/depends/md5)
#add_subdirectory (dfhack/depends/tinyxml)
2010-04-02 09:56:38 -06:00
#add_subdirectory (dfhack/depends/argstream)
add_subdirectory (tools)
add_subdirectory (examples)