代码拉取完成,页面将自动刷新
project(Ork CXX C)
cmake_minimum_required(VERSION 2.6)
cmake_policy(VERSION 2.6)
SET(ORK_VERSION_MAJOR 3)
SET(ORK_VERSION_MINOR 2)
SET(ORK_VERSION "${ORK_VERSION_MAJOR}.${ORK_VERSION_MINOR}")
# Avoid source tree pollution
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "In-source builds are not permitted. Make a separate folder for building:\nmkdir build; cd build; cmake ..\nBefore that, remove the files already created:\nrm -rf CMakeCache.txt CMakeFiles")
endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
# Add a sensible build type default and warning because empty means no optimization and no debug info.
if(NOT CMAKE_BUILD_TYPE)
message("WARNING: CMAKE_BUILD_TYPE is not defined!\n Defaulting to CMAKE_BUILD_TYPE=RelWithDebInfo. Use ccmake to set a proper value.")
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif(NOT CMAKE_BUILD_TYPE)
# Common deps
find_package(PkgConfig)
PKG_CHECK_MODULES(Glew glew REQUIRED)
include_directories(${Glew_INCLUDE_DIRS})
link_directories(${Glew_LIBRARY_DIRS})
PKG_CHECK_MODULES(GLFW glfw3 REQUIRED)
include_directories(${GLFW_INCLUDE_DIRS})
link_directories(${GLFW_LIBRARY_DIRS})
find_package(GLUT)
#find_package(OpenGL)
set(LIB_INSTALL_DIR "lib" CACHE STRING "Library directory name (lib/lib32/lib64)" )
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
add_definitions("-DORK_API=" "-DTIXML_USE_STL" "-fPIC")
option(BUILD_SHARED "Build shared library instead of static" OFF)
option(BUILD_EXAMPLES "Build examples" ON )
option(BUILD_TESTS "Build tests" ON )
option(USE_SHARED_PTR "Use std::shared_ptr" ON )
option(USE_FREEGLUT "Use freeglut" ON )
if(USE_SHARED_PTR)
add_definitions("-DUSE_SHARED_PTR")
endif(USE_SHARED_PTR)
if(USE_FREEGLUT)
add_definitions("-DUSEFREEGLUT")
endif(USE_FREEGLUT)
# Sub dirs
add_subdirectory(libraries)
add_subdirectory(ork)
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif(BUILD_EXAMPLES)
if(BUILD_TESTS)
add_subdirectory(test)
endif(BUILD_TESTS)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。