Skip to content
Permalink
af68184db9
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
45 lines (38 sloc) 1.91 KB
# This file controls the build process. When you save it, VS figures out what types of executables that it builds.
# Then, you can switch the executable that you want to run at the top from the drop down and hit run to build and
# run it.
#
cmake_minimum_required (VERSION 2.6)
message("Starting CMAKE")
project (Breadcrumbs)
# The version number.
set (Bfs_VERSION_MAJOR 1)
set (Bfs_VERSION_MINOR 0)
# Setting paths
message("Setting paths...")
set(CMAKE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/src) # Code directory
set(CMAKE_BINARY_DIR ${PROJECT_SOURCE_DIR}/build) # Object files and such (.o)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) # Compiled executables for execution and test (.exe)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib) # Compiled libraries (.lib and .dll)
set(CMAKE_INCLUDE_PATH ${PROJECT_SOURCE_DIR}/include) # Publicly accessible header files
message("Root directory: ${PROJECT_SOURCE_DIR}")
message("Source directory: ${CMAKE_SOURCE_DIR}")
message("Build directory: ${CMAKE_BINARY_DIR}")
message("Executable directory: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
message("Library directory: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
message("Header file directory: ${INCLUDES_DIRECTORY}")
# Configure a header file to pass some of the CMake settings to the source code
configure_file (
"${PROJECT_SOURCE_DIR}/CMakeConfig.h.in"
"${CMAKE_INCLUDE_PATH}/CMakeConfig.h"
)
# Adding public includes to include search path
include_directories("${CMAKE_INCLUDE_PATH}")
# Adding private include files from source tree
include_directories("${CMAKE_SOURCE_DIR}")
# puts all .cpp files inside src to the SOURCES variable
# TODO: replace this with a script for collecting cpp files
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/*.cpp")
message("Source files: ${SOURCES}")
# Adding executables
add_executable(Breadcrumbs ${SOURCES})