Skip to content
This repository was archived by the owner on Oct 17, 2019. It is now read-only.

Commit 271fc6a

Browse files
committed
Fix to find PDA with cmake when building with alibuild.
1 parent 5c3f86f commit 271fc6a

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

RORC/cmake/FindPDA.cmake

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@
44
# PDA_INCLUDE_DIRS - The PDA include directories
55
# PDA_LIBRARIES - The libraries needed to use PDA
66
# PDA_DEFINITIONS - Compiler switches required for using PDA
7+
#
8+
# This script can use the following variables:
9+
# PDA_ROOT - Installation root to tell this module where to look. (it tries /usr and /usr/local otherwise)
710

811
find_package(PkgConfig)
912

10-
#set(PDA_PREFIX "/usr/local" CACHE PATH "A path where to look for PDA in addition to default paths.")
13+
# find includes
14+
find_path(PDA_INCLUDE_DIR device_operator.h
15+
HINTS ${PDA_ROOT}/include /usr/local/include /usr/include PATH_SUFFIXES "pda")
16+
# Remove the final "pda"
17+
get_filename_component(PDA_INCLUDE_DIR ${PDA_INCLUDE_DIR} DIRECTORY)
1118

12-
find_path(PDA_INCLUDE_DIR pda/device_operator.h)
13-
find_library(PDA_LIBRARY NAMES pda)
19+
# find libraries
20+
find_library(PDA_LIBRARY NAMES pda HINTS /usr/local/lib /usr/lib ${PDA_ROOT}/lib)
1421

1522
set(PDA_LIBRARIES ${PDA_LIBRARY})
1623
set(PDA_INCLUDE_DIRS ${PDA_INCLUDE_DIR})
@@ -20,7 +27,4 @@ include(FindPackageHandleStandardArgs)
2027
# if all listed variables are TRUE
2128
find_package_handle_standard_args(PDA DEFAULT_MSG PDA_LIBRARY PDA_INCLUDE_DIR)
2229

23-
# Because case is a problem some times
24-
#set(PDA_FOUND ${PDA_FOUND}) # Not this time!
25-
2630
mark_as_advanced(PDA_INCLUDE_DIR PDA_LIBRARY)

0 commit comments

Comments
 (0)