forked from hpcc-systems/HPCC-Platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindXSLTPROC.cmake
58 lines (51 loc) · 1.84 KB
/
FindXSLTPROC.cmake
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
################################################################################
# HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
# - Try to find the xsltproc executable
#
# XSLTPROC_FOUND - system has the xsltproc executable.
# XSLTPROC_EXECUTABLE - the runtime path of the xsltproc executable
if (NOT XSLTPROC_FOUND)
IF (WIN32)
SET (xsltproc_n "xsltproc.exe")
ELSE()
SET (xsltproc_n "xsltproc")
ENDIF()
IF (NOT "${EXTERNALS_DIRECTORY}" STREQUAL "")
IF (UNIX)
IF (${ARCH64BIT} EQUAL 1)
SET (osdir "linux64_gcc4.1.1")
ELSE()
SET (osdir "linux32_gcc4.1.1")
ENDIF()
ELSEIF(WIN32)
SET (osdir "lib")
ELSE()
SET (osdir "unknown")
ENDIF()
IF (NOT ("${osdir}" STREQUAL "unknown"))
FIND_PROGRAM(XSLTPROC_EXECUTABLE ${xsltproc_n} PATHS "${EXTERNALS_DIRECTORY}/xsltproc/${osdir}")
ENDIF()
ENDIF()
if (USE_NATIVE_LIBRARIES)
# if we didn't find in externals, look in system include path
FIND_PROGRAM(XSLTPROC_EXECUTABLE ${xsltproc_n})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(XSLTPROC DEFAULT_MSG
XSLTPROC_EXECUTABLE
)
MARK_AS_ADVANCED(XSLTPROC_EXECUTABLE)
ENDIF()