42 lines
1.2 KiB
CMake
42 lines
1.2 KiB
CMake
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
|
|
|
PROJECT(PolyVox)
|
|
|
|
SET(POLYVOX_VERSION_MAJOR "0")
|
|
SET(POLYVOX_VERSION_MINOR "1")
|
|
SET(POLYVOX_VERSION_PATCH "0")
|
|
SET(POLYVOX_VERSION "${POLYVOX_VERSION_MAJOR}.${POLYVOX_VERSION_MINOR}.${POLYVOX_VERSION_PATCH}")
|
|
|
|
OPTION(ENABLE_CPP0X "Does the compiler support C++0x" OFF) #Enable with -DENABLE_CPP0X=ON or in the GUI
|
|
IF(ENABLE_CPP0X)
|
|
IF(CMAKE_COMPILER_IS_GNUCXX) #Maybe "OR MINGW"
|
|
ADD_DEFINITIONS(-DC_PLUS_PLUS_ZERO_X_SUPPORTED -std=c++0x) #Will only work on GCC
|
|
ELSEIF(MSYS)
|
|
#ADD_DEFINITIONS(-DC_PLUS_PLUS_ZERO_X_SUPPORTED)
|
|
ENDIF()
|
|
ENDIF()
|
|
|
|
ADD_SUBDIRECTORY(library)
|
|
|
|
OPTION(ENABLE_EXAMPLES "Should the examples be built" ON)
|
|
IF(ENABLE_EXAMPLES)
|
|
ADD_SUBDIRECTORY(examples/OpenGL)
|
|
ADD_DEPENDENCIES(OpenGLExample PolyVoxCore PolyVoxUtil)
|
|
ENDIF(ENABLE_EXAMPLES)
|
|
|
|
INCLUDE(Packaging.cmake)
|
|
|
|
INCLUDE(CTest)
|
|
IF(BUILD_TESTING)
|
|
ADD_SUBDIRECTORY(tests)
|
|
ENDIF(BUILD_TESTING)
|
|
|
|
# Option summary
|
|
MESSAGE(STATUS "")
|
|
MESSAGE(STATUS "Summary")
|
|
MESSAGE(STATUS "-------")
|
|
MESSAGE(STATUS "C++0x mode: " ${ENABLE_CPP0X})
|
|
MESSAGE(STATUS "Build examples: " ${ENABLE_EXAMPLES})
|
|
MESSAGE(STATUS "Build tests: " ${BUILD_TESTING})
|
|
MESSAGE(STATUS "")
|