1 Star 3 Fork 1

一幻一/cesium-terrain-builder

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 2.56 KB
一键复制 编辑 原始数据 按行查看 历史
Homme Zwaagstra 提交于 2015-01-30 16:16 . Updated version number to v0.4.1
cmake_minimum_required(VERSION 2.6)
project("Cesium Terrain Builder")
# The version number
set(CTB_VERSION_MAJOR 0)
set(CTB_VERSION_MINOR 4)
set(CTB_VERSION_PATCH 1)
# Ensure we have a C++11 compatible compiler (see
# http://www.guyrutenberg.com/2014/01/05/enabling-c11-c0x-in-cmake/)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(NOT MSVC)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
endif()
# We need g++ >= version 4.7 (see
# http://stackoverflow.com/questions/4058565/check-gcc-minor-in-cmake)
if (CMAKE_COMPILER_IS_GNUCXX)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
OUTPUT_VARIABLE GCXX_VERSION)
if (GCXX_VERSION VERSION_LESS 4.7)
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} is version ${GCXX_VERSION} which is not supported. Please use version 4.7 or greater.")
endif()
endif()
# The tile size (width and height). According to the spec this should always be
# 65
set(TERRAIN_TILE_SIZE 65)
# The tile water mask size (width and height). According to the spec this
# should always be 256
set(TERRAIN_MASK_SIZE 256)
# Configure a header file to pass some of the CMake settings to the source code
configure_file(
"${PROJECT_SOURCE_DIR}/src/config.hpp.in"
"${PROJECT_BINARY_DIR}/config.hpp"
)
# Add the binary tree to the search path for include files so that we will find
# `config.hpp`
include_directories("${PROJECT_BINARY_DIR}")
# Ensure the configuration is installed
install(FILES ${PROJECT_BINARY_DIR}/config.hpp DESTINATION include/ctb)
# Perform as many checks as possible on debug builds:
# cmake -DCMAKE_BUILD_TYPE=Debug ..
if(NOT MSVC)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra --pedantic")
#set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra --pedantic")
endif()
FIND_PACKAGE (Threads)
# We need GDAL
find_package(GDAL)
if(NOT GDAL_FOUND)
message(FATAL_ERROR "The GDAL library cannot be found on the system")
endif()
include_directories(${GDAL_INCLUDE_DIRS})
# Build and install libctb
include_directories("${PROJECT_SOURCE_DIR}/src")
add_subdirectory(src)
# Build and install libcommander
include_directories("${PROJECT_SOURCE_DIR}/deps")
add_subdirectory(deps)
# Build and install the tools
add_subdirectory(tools)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/itfsw/cesium-terrain-builder.git
git@gitee.com:itfsw/cesium-terrain-builder.git
itfsw
cesium-terrain-builder
cesium-terrain-builder
master-quantized-mesh

搜索帮助