-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
67 lines (55 loc) · 2.27 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# CMake project file for VOMS-XRootD
cmake_minimum_required (VERSION 2.6)
project (vomsxrd)
if(NOT (CMAKE_VERSION VERSION_LESS "2.8.12"))
cmake_policy(SET CMP0021 OLD)
endif()
# make sure that the default is a RELEASE
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE RELEASE CACHE STRING
"Choose the type of build, options are: None Debug Release."
FORCE)
endif (NOT CMAKE_BUILD_TYPE)
# Add uninstall target
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake")
set( CMAKE_MODULE_PATH
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/cmake )
include_directories(${PROJECT_SOURCE_DIR}/src)
include( vomsxrdOSDefs )
#-------------------------------------------------------------------------------
# Generate the version header
#-------------------------------------------------------------------------------
add_custom_target(
XrdSecgsiVOMSVers.hh
${CMAKE_SOURCE_DIR}/genversion.sh ${CMAKE_SOURCE_DIR} )
# sigh, yet another ugly hack :(
macro( add_library _target )
_add_library( ${_target} ${ARGN} )
add_dependencies( ${_target} XrdSecgsiVOMSVers.hh )
endmacro()
macro( add_executable _target )
_add_executable( ${_target} ${ARGN} )
add_dependencies( ${_target} XrdSecgsiVOMSVers.hh )
endmacro()
#-------------------------------------------------------------------------------
# VOMS libs required
#-------------------------------------------------------------------------------
find_package( VOMS REQUIRED)
find_package( XRootD REQUIRED)
#-------------------------------------------------------------------------------
# Build in subdirectories
#-------------------------------------------------------------------------------
add_subdirectory( src )
#-------------------------------------------------------------------------------
# Summary
#-------------------------------------------------------------------------------
message( STATUS "----------------------------------------" )
message( STATUS "Installation path: " ${CMAKE_INSTALL_PREFIX} )
message( STATUS "Build type: " ${CMAKE_BUILD_TYPE} )
message( STATUS "----------------------------------------" )