Commit 04fd66e2 authored by Kenton Varda's avatar Kenton Varda

Move cmake files into c++ subdir.

The idea behind the directory organization was that we might have official implementations for other languages in other top-level directories, as siblings to the c++ directory. It seems implausible that we'd use CMake as a meta-build-system over all of these.

Another reason for this change is that the release tarball actually contains only the c++ subdirectory. We probably want to include cmake files in the release.
parent 8ce295c4
project("Cap'n Proto" CXX)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(CheckIncludeFileCXX)
if(MSVC)
check_include_file_cxx(initializer_list HAS_CXX11)
else()
check_include_file_cxx(initializer_list HAS_CXX11 "-std=c++11")
endif()
if(NOT HAS_CXX11)
message(SEND_ERROR "Requires a C++11 compiler and standard library.")
endif()
# Set installation paths; these can be overridden in the cache.
set(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
CACHE PATH "Base installation path for executables."
)
set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin"
CACHE PATH "Installation directory for binaries (default: prefix/bin)."
)
set(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib"
CACHE PATH "Installation directory for libraries (default: prefix/lib)."
)
set(INCLUDE_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/include"
CACHE PATH "Installation directory for header files (default: prefix/include)."
)
add_subdirectory(c++)
project("Cap'n Proto" CXX)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(CheckIncludeFileCXX)
if(MSVC)
check_include_file_cxx(initializer_list HAS_CXX11)
else()
check_include_file_cxx(initializer_list HAS_CXX11 "-std=c++11")
endif()
if(NOT HAS_CXX11)
message(SEND_ERROR "Requires a C++11 compiler and standard library.")
endif()
# Set installation paths; these can be overridden in the cache.
set(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
CACHE PATH "Base installation path for executables."
)
set(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin"
CACHE PATH "Installation directory for binaries (default: prefix/bin)."
)
set(LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib"
CACHE PATH "Installation directory for libraries (default: prefix/lib)."
)
set(INCLUDE_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/include"
CACHE PATH "Installation directory for header files (default: prefix/include)."
)
# Options ====================================================================== # Options ======================================================================
......
...@@ -144,6 +144,7 @@ while [ $# -gt 0 ]; do ...@@ -144,6 +144,7 @@ while [ $# -gt 0 ]; do
exit 0 exit 0
;; ;;
cmake ) cmake )
cd c++
rm -rf cmake-build rm -rf cmake-build
mkdir cmake-build mkdir cmake-build
cd cmake-build cd cmake-build
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment