FindSubversionLibrary.cmake 16.9 KB
Newer Older
1 2 3 4 5 6 7 8 9
# - Try to find subversion libraries
#
#  This macro uses the following variables as preference for seraching the
#  headers and includes:
#  SUBVERSION_INSTALL_PATH - root directory where subversion is installed (ususally /usr)
#  APR_CONFIG_PATH - path where apr-config or apr-1-config are located
#  APU_CONFIG_PATH - path where apu-config or apu-1-config are located
#
#  The variables set by this macro are:
10
#  SubversionLibrary_FOUND - system has subversion libraries
11 12
#  SUBVERSION_INCLUDE_DIRS - the include directories to link to subversion
#  SUBVERSION_LIBRARIES - The libraries needed to link to subversion
13 14 15 16 17 18 19
#  Copyright (c) 2009      Lambert CLARA <lambert.clara@yahoo.fr>
#  Copyright (c) 2009      Bernhard Rosenkraenzer <ber@arklinux.org>
#  Copyright (c) 2007-2009 Andreas Pakulat <apaku@gmx.de>
#
#  Redistribution AND use is allowed according to the terms of the New
#  BSD license.
#  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
20 21 22 23 24 25 26 27 28

IF(SUBVERSION_INCLUDE_DIRS AND SUBVERSION_LIBRARIES)
    # Already in cache, be silent
    SET(Subversion_FIND_QUIETLY TRUE)
ENDIF(SUBVERSION_INCLUDE_DIRS AND SUBVERSION_LIBRARIES)

IF (NOT WIN32)

    MACRO(FIND_SUB_LIB targetvar libname)
29 30 31 32
      FIND_LIBRARY(${targetvar} ${libname}
          HINTS
          ${SUBVERSION_INSTALL_PATH}/lib
      )
33 34
    ENDMACRO(FIND_SUB_LIB)

35 36 37 38 39
    FIND_PATH(SUBVERSION_INCLUDE_DIR svn_version.h
        HINTS
        ${SUBVERSION_INSTALL_PATH}/include
        PATH_SUFFIXES subversion-1
    )
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 67 68 69 70 71 72 73 74 75 76

    FIND_SUB_LIB(SUBVERSION_CLIENTLIB svn_client-1)
    FIND_SUB_LIB(SUBVERSION_REPOSITORYLIB svn_repos-1)
    FIND_SUB_LIB(SUBVERSION_WCLIB svn_wc-1)
    FIND_SUB_LIB(SUBVERSION_FSLIB svn_fs-1)
    FIND_SUB_LIB(SUBVERSION_SUBRLIB svn_subr-1)
    FIND_SUB_LIB(SUBVERSION_RALIB svn_ra-1)


    IF(APR_CONFIG_PATH)
        FIND_PROGRAM(APR_CONFIG NAMES apr-config apr-1-config
            PATHS
            ${APR_CONFIG_PATH}
            /usr/local/apr/bin
        )
    ELSE(APR_CONFIG_PATH)
        FIND_PROGRAM(APR_CONFIG NAMES apr-config apr-1-config
            PATHS
            /usr/local/apr/bin
        )
    ENDIF(APR_CONFIG_PATH)

    IF(APU_CONFIG_PATH)
        FIND_PROGRAM(APU_CONFIG NAMES apu-config apu-1-config
            PATHS
            ${APU_CONFIG_PATH}
            /usr/local/apr/bin
        )
    ELSE(APU_CONFIG_PATH)
        FIND_PROGRAM(APU_CONFIG NAMES apu-config apu-1-config
            PATHS
            /usr/local/apr/bin
        )
    ENDIF(APU_CONFIG_PATH)

    IF(NOT APR_CONFIG)
        MESSAGE(STATUS "no apr-config found, subversion support will be disabled")
77
        SET(SubversionLibrary_FOUND false)
78 79 80 81 82 83 84 85 86 87 88 89
    ELSE(NOT APR_CONFIG)
        EXEC_PROGRAM(${APR_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE APR_INCLUDE_DIR)
        STRING(REPLACE "-I" "" APR_INCLUDE_DIR ${APR_INCLUDE_DIR})
        EXEC_PROGRAM(${APR_CONFIG} ARGS "--link-ld" OUTPUT_VARIABLE _LINK_LD_ARGS)
        STRING( REPLACE " " ";" _LINK_LD_ARGS ${_LINK_LD_ARGS} )
        FOREACH( _ARG ${_LINK_LD_ARGS} )
            IF(${_ARG} MATCHES "^-L")
                STRING(REGEX REPLACE "^-L" "" _ARG ${_ARG})
                SET(_APR_LIB_PATHS ${_APR_LIB_PATHS} ${_ARG})
            ENDIF(${_ARG} MATCHES "^-L")
            IF(${_ARG} MATCHES "^-l")
               STRING(REGEX REPLACE "^-l" "" _ARG ${_ARG})
90
               FIND_LIBRARY(_APR_LIB_FROM_ARG NAMES ${_ARG}
91 92 93
                    PATHS
                    ${_APR_LIB_PATHS}
               )
94 95 96
               IF(_APR_LIB_FROM_ARG)
                  SET(APR_LIBRARY ${APR_LIBRARY} ${_APR_LIB_FROM_ARG})
               ENDIF(_APR_LIB_FROM_ARG)
97 98 99
            ENDIF(${_ARG} MATCHES "^-l")
         ENDFOREACH(_ARG)
    ENDIF(NOT APR_CONFIG)
100
    
101 102
    IF(NOT APU_CONFIG)
        MESSAGE(STATUS "no apu-config found, subversion support will be disabled")
103
        SET(SubversionLibrary_FOUND false)
104 105 106 107 108
    ELSE(NOT APU_CONFIG)
        EXEC_PROGRAM(${APU_CONFIG} ARGS "--includedir" OUTPUT_VARIABLE APU_INCLUDE_DIR)
        STRING(REPLACE "-I" "" APU_INCLUDE_DIR ${APU_INCLUDE_DIR})
        EXEC_PROGRAM(${APU_CONFIG} ARGS "--link-ld" OUTPUT_VARIABLE _LINK_LD_ARGS)
        STRING( REPLACE " " ";" _LINK_LD_ARGS ${_LINK_LD_ARGS} )
109
        SET(_APU_LIB_PATHS "")
110 111 112 113 114 115 116
        FOREACH( _ARG ${_LINK_LD_ARGS} )
            IF(${_ARG} MATCHES "^-L")
                STRING(REGEX REPLACE "^-L" "" _ARG ${_ARG})
                SET(_APU_LIB_PATHS ${_APU_LIB_PATHS} ${_ARG})
            ENDIF(${_ARG} MATCHES "^-L")
            IF(${_ARG} MATCHES "^-l")
               STRING(REGEX REPLACE "^-l" "" _ARG ${_ARG})
117
               FIND_LIBRARY(_APU_LIB_FROM_ARG NAMES ${_ARG}
118
                    PATHS
119
                    ${_APU_LIB_PATHS}
120
               )
121 122 123
               IF(_APU_LIB_FROM_ARG)
                  SET(APU_LIBRARY ${APU_LIBRARY} ${_APU_LIB_FROM_ARG})
               ENDIF(_APU_LIB_FROM_ARG)
124 125 126 127 128 129 130 131 132
            ENDIF(${_ARG} MATCHES "^-l")
        ENDFOREACH(_ARG)
    ENDIF(NOT APU_CONFIG)
ELSE (NOT WIN32)
#search libaries for Windows
#this needs more work

# search for pathes

133
    MACRO(FIND_SUB_INC targetvar include pathadd)
134
      IF (SUBVERSION_INSTALL_PATH)
135
          FIND_PATH(${targetvar} ${include}
136 137
              PATHS
              ${SUBVERSION_INSTALL_PATH}/include${pathadd}
138
              "$ENV{ProgramFiles}/Subversion/include${pathadd}"
139
              PATH_SUFFIXES subversion-1
140 141
          )
      ELSE(SUBVERSION_INSTALL_PATH)
142
          FIND_PATH(${targetvar} ${include}
143
              "$ENV{ProgramFiles}/Subversion/include${pathadd}"
144
              PATH_SUFFIXES "subversion-1"
145 146 147 148 149 150 151 152 153
          )
      ENDIF(SUBVERSION_INSTALL_PATH)
    ENDMACRO(FIND_SUB_INC)

    MACRO(FIND_SUB_LIB targetvar libname)
      IF (SUBVERSION_INSTALL_PATH)
          FIND_LIBRARY(${targetvar} ${libname}
              PATHS
              ${SUBVERSION_INSTALL_PATH}/lib
154
              "$ENV{ProgramFiles}/Subversion/lib"
155 156 157 158
          )
      ELSE(SUBVERSION_INSTALL_PATH)
          FIND_LIBRARY(${targetvar} ${libname}
              PATHS
159
              "$ENV{ProgramFiles}/Subversion/lib"
160 161 162 163 164 165
          )
      ENDIF(SUBVERSION_INSTALL_PATH)
    ENDMACRO(FIND_SUB_LIB)

    FIND_SUB_INC(SUBVERSION_INCLUDE_DIR svn_version.h "")

166
    FIND_SUB_INC(APR_INCLUDE_DIR apr.h "")
167

168
    FIND_SUB_INC(APU_INCLUDE_DIR apu.h "")
169 170 171


  # search for libraries
172
    FIND_SUB_LIB(APR_LIBRARY apr-1)
173

174
    FIND_SUB_LIB(APRICONV_LIB apriconv-1)
175

176
    FIND_SUB_LIB(APU_LIBRARY aprutil-1)
177 178 179 180 181 182 183

    #FIND_SUB_LIB(APU_XMLLIB xml)

    #FIND_SUB_LIB(NEON_LIB libneon)

    #FIND_SUB_LIB(NEON_ZLIBSTATLIB zlibstat )

184
    FIND_SUB_LIB(SUBVERSION_CLIENTLIB svn_client-1)
185

186
    FIND_SUB_LIB(SUBVERSION_DELTALIB svn_delta-1)
187

188
    FIND_SUB_LIB(SUBVERSION_DIFFLIB svn_diff-1)
189

190
    #FIND_SUB_LIB(SUBVERSION_FSBASELIB svn_fs_base-1)
191

192
    #FIND_SUB_LIB(SUBVERSION_FSFSLIB svn_fs_fs-1)
193

194
    FIND_SUB_LIB(SUBVERSION_FSLIB svn_fs-1)
195

196
    #FIND_SUB_LIB(SUBVERSION_RADAVLIB svn_ra_dav-1)
197

198
    #FIND_SUB_LIB(SUBVERSION_RALOCALLIB svn_ra_local-1)
199

200
    #FIND_SUB_LIB(SUBVERSION_RASVNLIB svn_ra_svn-1)
201

202
    FIND_SUB_LIB(SUBVERSION_RALIB svn_ra-1)
203

204
    FIND_SUB_LIB(SUBVERSION_REPOSITORYLIB svn_repos-1)
205

206
    FIND_SUB_LIB(SUBVERSION_SUBRLIB svn_subr-1)
207

208
    FIND_SUB_LIB(SUBVERSION_WCLIB svn_wc-1)
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275

    # these are the win32-only libs, the others handled at the bottom.
    MARK_AS_ADVANCED(
        APRICONV_LIB
        #APU_XMLLIB
        #NEON_LIB
        #NEON_ZLIBSTATLIB
        SUBVERSION_DELTALIB
        SUBVERSION_DIFFLIB
        SUBVERSION_FSBASELIB
        SUBVERSION_FSFSLIB
        SUBVERSION_RADAVLIB
        SUBVERSION_RALOCALLIB
        SUBVERSION_RASVNLIB
    )

  # check found libraries

    IF (NOT APRICONV_LIB)
        MESSAGE(STATUS "No apriconv lib found!")
    ELSE (NOT APRICONV_LIB)
        IF(NOT Subversion_FIND_QUIETLY)
            MESSAGE(STATUS "Found apriconv lib: ${APRICONV_LIB}")
        ENDIF(NOT Subversion_FIND_QUIETLY)
        SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${APRICONV_LIB})
    ENDIF(NOT APRICONV_LIB)

    #IF (NOT APU_XMLLIB)
    #    MESSAGE(STATUS "No xml lib found!")
    #ELSE (NOT APU_XMLLIB)
    #    IF(NOT Subversion_FIND_QUIETLY)
    #        MESSAGE(STATUS "Found xml lib: ${APU_XMLLIB}")
    #    ENDIF(NOT Subversion_FIND_QUIETLY)
    #    SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${APU_XMLLIB})
    #ENDIF(NOT APU_XMLLIB)

    #IF (NOT NEON_LIB)
    #    MESSAGE(STATUS "No neon lib found!")
    #ELSE (NOT NEON_LIB)
    #    IF(NOT Subversion_FIND_QUIETLY)
    #        MESSAGE(STATUS "Found neon lib: ${NEON_LIB}")
    #    ENDIF(NOT Subversion_FIND_QUIETLY)
    #    SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${NEON_LIB})
    #ENDIF(NOT NEON_LIB)

    #IF (NOT NEON_ZLIBSTATLIB)
    #    MESSAGE(STATUS "No zlibstat lib found!")
    #ELSE (NOT APRICONV_LIB)
    #    IF(NOT Subversion_FIND_QUIETLY)
    #        MESSAGE(STATUS "Found zlibstat lib: ${NEON_ZLIBSTATLIB}")
    #    ENDIF(NOT Subversion_FIND_QUIETLY)
    #    SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${NEON_ZLIBSTATLIB})
    #ENDIF(NOT NEON_ZLIBSTATLIB)

    IF (NOT SUBVERSION_DELTALIB)
        MESSAGE(STATUS "No subversion delta lib found!")
    ELSE (NOT SUBVERSION_DELTALIB)
        IF(NOT Subversion_FIND_QUIETLY)
            MESSAGE(STATUS "Found subversion delta lib: ${SUBVERSION_DELTALIB}")
        ENDIF(NOT Subversion_FIND_QUIETLY)
        SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_DELTALIB})
    ENDIF(NOT SUBVERSION_DELTALIB)

    IF (NOT SUBVERSION_DIFFLIB)
        MESSAGE(STATUS "No subversion diff lib found!")
    ELSE (NOT SUBVERSION_DIFFLIB)
        IF(NOT Subversion_FIND_QUIETLY)
Laurent Montel's avatar
typo  
Laurent Montel committed
276
            MESSAGE(STATUS "Found subversion diff lib: ${SUBVERSION_DIFFLIB}")
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333
        ENDIF(NOT Subversion_FIND_QUIETLY)
        SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_DIFFLIB})
    ENDIF(NOT SUBVERSION_DIFFLIB)

    #IF (NOT SUBVERSION_FSBASELIB)
    #    MESSAGE(STATUS "No subversion fs base lib found!")
    #ELSE (NOT SUBVERSION_FSBASELIB)
    #    IF(NOT Subversion_FIND_QUIETLY)
    #        MESSAGE(STATUS "Found subversion fs base lib: ${SUBVERSION_FSBASELIB}")
    #    ENDIF(NOT Subversion_FIND_QUIETLY)
    #    SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_FSBASELIB})
    #ENDIF(NOT SUBVERSION_FSBASELIB)

    #IF (NOT SUBVERSION_FSFSLIB)
    #    MESSAGE(STATUS "No subversion fs fs lib found!")
    #ELSE (NOT SUBVERSION_FSFSLIB)
    #    IF(NOT Subversion_FIND_QUIETLY)
    #        MESSAGE(STATUS "Found subversion fs fs lib: ${SUBVERSION_FSFSLIB}")
    #    ENDIF(NOT Subversion_FIND_QUIETLY)
    #    SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_FSFSLIB})
    #ENDIF(NOT SUBVERSION_FSFSLIB)

    #IF (NOT SUBVERSION_RADAVLIB)
    #    MESSAGE(STATUS "No subversion ra dav lib found!")
    #ELSE (NOT SUBVERSION_RADAVLIB)
    #    IF(NOT Subversion_FIND_QUIETLY)
    #        MESSAGE(STATUS "Found subversion lib: ${SUBVERSION_RADAVLIB}")
    #    ENDIF(NOT Subversion_FIND_QUIETLY)
    #    SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_RADAVLIB})
    #ENDIF(NOT SUBVERSION_RADAVLIB)

    #IF (NOT SUBVERSION_RALOCALLIB)
    #    MESSAGE(STATUS "No subversion ra local lib found!")
    #ELSE (NOT SUBVERSION_RALOCALLIB)
    #    IF(NOT Subversion_FIND_QUIETLY)
    #        MESSAGE(STATUS "Found subversion ra local lib: ${SUBVERSION_RALOCALLIB}")
    #    ENDIF(NOT Subversion_FIND_QUIETLY)
    #    SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_RALOCALLIB})
    #ENDIF(NOT SUBVERSION_RALOCALLIB)

    #IF (NOT SUBVERSION_RASVNLIB)
    #    MESSAGE(STATUS "No subversion ra svn lib found!")
    #ELSE (NOT SUBVERSION_RASVNLIB)
    #    IF(NOT Subversion_FIND_QUIETLY)
    #        MESSAGE(STATUS "Found subversion ra svn lib: ${SUBVERSION_RASVNLIB}")
    #    ENDIF(NOT Subversion_FIND_QUIETLY)
    #    SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_RASVNLIB})
    #ENDIF(NOT SUBVERSION_RASVNLIB)

ENDIF (NOT WIN32)

##############################
# Setup the result variables #
##############################

IF(NOT SUBVERSION_INCLUDE_DIR)
  MESSAGE(STATUS "No subversion includes found, subversion support will be disabled")
334
  SET(SubversionLibrary_FOUND false)
335 336 337 338
ELSE(NOT SUBVERSION_INCLUDE_DIR)
  IF(NOT Subversion_FIND_QUIETLY)
    MESSAGE(STATUS "Found subversion include: ${SUBVERSION_INCLUDE_DIR}")
  ENDIF(NOT Subversion_FIND_QUIETLY)
339
  SET(SubversionLibrary_FOUND true)
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364
  SET(SUBVERSION_INCLUDE_DIRS ${SUBVERSION_INCLUDE_DIR})
ENDIF(NOT SUBVERSION_INCLUDE_DIR)

IF(NOT APR_INCLUDE_DIR)
  MESSAGE(STATUS "No apr includes found, subversion support will be disabled")
  SET(APR_FOUND false)
ELSE(NOT APR_INCLUDE_DIR)
  IF(NOT Subversion_FIND_QUIETLY)
    MESSAGE(STATUS "Found apr include: ${APR_INCLUDE_DIR}")
  ENDIF(NOT Subversion_FIND_QUIETLY)
  SET(SUBVERSION_INCLUDE_DIRS ${SUBVERSION_INCLUDE_DIRS} ${APR_INCLUDE_DIR})
ENDIF(NOT APR_INCLUDE_DIR)

IF(NOT APU_INCLUDE_DIR)
  MESSAGE(STATUS "No apu includes found, subversion support will be disabled")
  SET(APU_FOUND false)
ELSE(NOT APU_INCLUDE_DIR)
  IF(NOT Subversion_FIND_QUIETLY)
    MESSAGE(STATUS "Found apu include: ${APU_INCLUDE_DIR}")
  ENDIF(NOT Subversion_FIND_QUIETLY)
  SET(SUBVERSION_INCLUDE_DIRS ${SUBVERSION_INCLUDE_DIRS} ${APU_INCLUDE_DIR})
ENDIF(NOT APU_INCLUDE_DIR)

IF (NOT SUBVERSION_CLIENTLIB)
  MESSAGE(STATUS "No subversion client libs found, subversion support will be disabled")
365
  SET(SubversionLibrary_FOUND false)
366 367 368 369 370 371 372 373 374
ELSE (NOT SUBVERSION_CLIENTLIB)
  IF(NOT Subversion_FIND_QUIETLY)
    MESSAGE(STATUS "Found subversion client lib: ${SUBVERSION_CLIENTLIB}")
  ENDIF(NOT Subversion_FIND_QUIETLY)
  SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_CLIENTLIB})
ENDIF(NOT SUBVERSION_CLIENTLIB)

IF (NOT SUBVERSION_REPOSITORYLIB)
  MESSAGE(STATUS "No subversion repository lib found, subversion support will be disabled")
375
  SET(SubversionLibrary_FOUND false)
376 377 378 379 380 381 382 383 384
ELSE (NOT SUBVERSION_REPOSITORYLIB)
  IF(NOT Subversion_FIND_QUIETLY)
    MESSAGE(STATUS "Found subversion repository lib: ${SUBVERSION_REPOSITORYLIB}")
  ENDIF(NOT Subversion_FIND_QUIETLY)
  SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_REPOSITORYLIB})
ENDIF(NOT SUBVERSION_REPOSITORYLIB)

IF (NOT SUBVERSION_FSLIB)
  MESSAGE(STATUS "No subversion fs lib found, subversion support will be disabled")
385
  SET(SubversionLibrary_FOUND false)
386 387 388 389 390 391 392 393 394
ELSE (NOT SUBVERSION_FSLIB)
  IF(NOT Subversion_FIND_QUIETLY)
    MESSAGE(STATUS "Found subversion fs lib: ${SUBVERSION_FSLIB}")
  ENDIF(NOT Subversion_FIND_QUIETLY)
  SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_FSLIB})
ENDIF(NOT SUBVERSION_FSLIB)

IF (NOT SUBVERSION_SUBRLIB)
  MESSAGE(STATUS "No subversion subr lib found, subversion support will be disabled")
395
  SET(SubversionLibrary_FOUND false)
396 397 398 399 400 401 402 403 404
ELSE (NOT SUBVERSION_SUBRLIB)
  IF(NOT Subversion_FIND_QUIETLY)
    MESSAGE(STATUS "Found subversion subr lib: ${SUBVERSION_SUBRLIB}")
  ENDIF(NOT Subversion_FIND_QUIETLY)
  SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_SUBRLIB})
ENDIF(NOT SUBVERSION_SUBRLIB)

IF (NOT SUBVERSION_WCLIB)
  MESSAGE(STATUS "No subversion wc lib found, subversion support will be disabled")
405
  SET(SubversionLibrary_FOUND false)
406 407 408 409 410 411 412 413 414
ELSE (NOT SUBVERSION_WCLIB)
  IF(NOT Subversion_FIND_QUIETLY)
    MESSAGE(STATUS "Found subversion wc lib: ${SUBVERSION_WCLIB}")
  ENDIF(NOT Subversion_FIND_QUIETLY)
  SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_WCLIB})
ENDIF(NOT SUBVERSION_WCLIB)

IF (NOT SUBVERSION_RALIB)
  MESSAGE(STATUS "No subversion ra lib found, subversion support will be disabled")
415
  SET(SubversionLibrary_FOUND false)
416 417 418 419 420 421 422 423 424
ELSE (NOT SUBVERSION_RALIB)
  IF(NOT Subversion_FIND_QUIETLY)
    MESSAGE(STATUS "Found subversion ra lib: ${SUBVERSION_RALIB}")
  ENDIF(NOT Subversion_FIND_QUIETLY)
  SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${SUBVERSION_RALIB})
ENDIF(NOT SUBVERSION_RALIB)

IF (NOT APR_LIBRARY)
  MESSAGE(STATUS "No apr lib found, subversion support will be disabled")
425
  SET(SubversionLibrary_FOUND false)
426 427 428 429 430 431 432 433
ELSE (NOT APR_LIBRARY)
  IF(NOT Subversion_FIND_QUIETLY)
    MESSAGE(STATUS "Found apr lib: ${APR_LIBRARY}")
  ENDIF(NOT Subversion_FIND_QUIETLY)
  SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${APR_LIBRARY})
ENDIF(NOT APR_LIBRARY)

IF (NOT APU_LIBRARY)
Andreas Pakulat's avatar
Andreas Pakulat committed
434
  MESSAGE(STATUS "No apu lib found, subversion support will be disabled")
435
  SET(SubversionLibrary_FOUND false)
436 437
ELSE (NOT APU_LIBRARY)
  IF(NOT Subversion_FIND_QUIETLY)
Andreas Pakulat's avatar
Andreas Pakulat committed
438
    MESSAGE(STATUS "Found apu lib: ${APU_LIBRARY}")
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462
  ENDIF(NOT Subversion_FIND_QUIETLY)
  SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} ${APU_LIBRARY})
ENDIF(NOT APU_LIBRARY)

SET(SUBVERSION_LIBRARIES ${SUBVERSION_LIBRARIES} CACHE STRING "List of all subversion and related libraries")
SET(SUBVERSION_INCLUDE_DIRS ${SUBVERSION_INCLUDE_DIRS} CACHE STRING "List of all subversion and related libraries include directories")
#SET(SUBVERSION_INCLUDE_DIR ${SUBVERSION_INCLUDE_DIR} CACHE PATH "Path of subversion include directory")

MARK_AS_ADVANCED(
  SUBVERSION_RALIB
  SUBVERSION_WCLIB
  SUBVERSION_SUBRLIB
  SUBVERSION_FSLIB
  SUBVERSION_CLIENTLIB
  SUBVERSION_REPOSITORYLIB
  SUBVERSION_INCLUDE_DIR
  SUBVERSION_INCLUDE_DIRS
  SUBVERSION_LIBRARIES
  APR_INCLUDE_DIR
  APR_LIBRARY
  APU_INCLUDE_DIR
  APU_LIBRARY
)

Laurent Montel's avatar
Laurent Montel committed
463
#kate: space-indent on; indent-width 2; tab-width: 2; replace-tabs on; auto-insert-doxygen on