Skip to content
Snippets Groups Projects
Commit 8f5ff639 authored by Christian Grefe's avatar Christian Grefe
Browse files

Made DDSegmentation stand-alone

parent 06e4fb50
No related branches found
No related tags found
No related merge requests found
......@@ -66,8 +66,10 @@ IF( INSTALL_DOC )
ENDIF()
find_package(DDSegmentation REQUIRED)
#---Packages------------------------------------------------------------------------
add_subdirectory(DDSegmentation)
#add_subdirectory(DDSegmentation)
add_subdirectory(DDCore)
add_subdirectory(DDSurfaces)
add_subdirectory(DDRec)
......
cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR)
project(DDSegmentation)
set(DDSegmentation_MAJOR_VERSION 0)
set(DDSegmentation_MINOR_VERSION 1)
set(DDSegmentation_PATCH_VERSION 0)
set(DDSegmentation_VERSION ${DDSegmentation_MAJOR_VERSION}.${DDSegmentation_MINOR_VERSION}.${DDSegmentation_PATCH_VERSION})
set(DDSegmentation_SOVERSION "${DDSegmentation_MAJOR_VERSION}.${DDSegmentation_MINOR_VERSION}.${DDSegmentation_PATCH_VERSION}" )
#------------- set the default installation directory to be the source directory
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET( CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR} CACHE PATH
"install prefix path - overwrite with -D CMAKE_INSTALL_PREFIX = ..."
FORCE )
MESSAGE(STATUS "CMAKE_INSTALL_PREFIX is ${CMAKE_INSTALL_PREFIX} - overwrite with -D CMAKE_INSTALL_PREFIX" )
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/include )
......@@ -6,7 +22,7 @@ file(GLOB sources src/*.cpp)
add_library(DDSegmentation SHARED ${sources})
SET_TARGET_PROPERTIES( DDSegmentation PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION})
SET_TARGET_PROPERTIES( DDSegmentation PROPERTIES VERSION ${DDSegmentation_VERSION} SOVERSION ${DDSegmentation_SOVERSION})
install(DIRECTORY include/DDSegmentation
DESTINATION include
......@@ -17,4 +33,13 @@ install(TARGETS DDSegmentation
LIBRARY DESTINATION lib
)
# to do: add corresponding uninstall...
#-------------------------------------------------------
\ No newline at end of file
#-------------------------------------------------------
# Export the package for use from the build-tree
# (this registers the build-tree with a global CMake-registry)
export(PACKAGE DDSegmentation)
# Create the DDSegmentationConfig.cmake and DDSegmentationConfigVersion files
configure_file(cmake/DDSegmentationConfig.cmake.in ${CMAKE_INSTALL_PREFIX}/DDSegmentationConfig.cmake)
#install(FILES ${PROJECT_SOURCE_DIR}/DDSegmentationConfig.cmake DESTINATION . )
##############################################################################
# cmake configuration file for DDSegmentation
#
# returns following variables:
#
# DDSegmentation_FOUND : set to TRUE if DDSegmentation found
# DDSegmentation_VERSION : package version
# DDSegmentation_ROOT : path to this DDSegmentation installation
# DDSegmentation_LIBRARIES : list of DD4hep libraries
# DDSegmentation_INCLUDE_DIR : list of paths to be used with INCLUDE_DIRECTORIES
# DDSegmentation_LIBRARY_DIR : list of paths to be used with LINK_DIRECTORIES
#
# @author Christian Grefe, CERN
##############################################################################
SET( DDSegmentation_ROOT "@CMAKE_INSTALL_PREFIX@" )
SET( DDSegmentation_VERSION "@DDSegmentation_VERSION@" )
# ---------- libraries --------------------------------------------------------
# do not store find results in cache
SET( DDSegmentation_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include" )
SET( DDSegmentation_LIBRARY_DIR "@CMAKE_INSTALL_PREFIX@/lib" )
SET( DDSegmentation_LIBRARIES DDSegmentation )
MARK_AS_ADVANCED( DDSegmentation_INCLUDE_DIRS DDSegmentation_LIBRARY_DIRS DDSegmentation_LIBRARIES )
INCLUDE( FindPackageHandleStandardArgs )
# set DDSegmentation_FOUND to TRUE if all listed variables are TRUE and not empty
FIND_PACKAGE_HANDLE_STANDARD_ARGS( DDSegmentation DEFAULT_MSG DDSegmentation_ROOT DDSegmentation_INCLUDE_DIR DDSegmentation_LIBRARIES )
SET( DDSegmentation_FOUND ${DDSegmentation_FOUND} )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment