https://github.com/root-project/root
Raw File
Tip revision: 5f171e3fdb60c0eee5781a91632073f2cfdf2b75 authored by Pere Mato on 09 September 2014, 12:27:07 UTC
Update ROOT version files to v5.34/21.
Tip revision: 5f171e3
StandaloneBuild.cmake
##################################################################################################
# --- StandaloneBuild.cmake module----------------------------------------------------------------
# This module provides the sufficent environemnt to be able to build ROOT as standalone projects
# It only assumes a valid ROOTSYS that can be provided directly with the command line
#              cmake -DROOTSYS=<ROOT Installation> <package source> 
##################################################################################################
 
#---Find ROOT ------------------------------------------------------------------------------------
if(DEFINED ROOTSYS AND NOT DEFINED ROOT_DIR)
  set(ROOT_DIR ${ROOTSYS}/cmake)
endif()
find_package(ROOT REQUIRED)

#---Minimal environment---------------------------------------------------------------------------
include(${ROOT_USE_FILE})

#---Initialize project----------------------------------------------------------------------------
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

#---Set Link and include directories--------------------------------------------------------------
set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
include_directories(${ROOT_INCLUDE_DIRS})
link_directories(${ROOT_LIBRARY_DIRS})



back to top