Use FIND_PROGRAM(perl) instead of FindPerl.
I don't see the value in using FindPerl at the moment.
This commit is contained in:
parent
319ff77100
commit
8415f297f0
|
@ -416,26 +416,26 @@ ENDIF(NOT SWIG)
|
||||||
|
|
||||||
IF(PHYSFS_BUILD_PERL)
|
IF(PHYSFS_BUILD_PERL)
|
||||||
MESSAGE(STATUS "Configuring Perl bindings...")
|
MESSAGE(STATUS "Configuring Perl bindings...")
|
||||||
INCLUDE(FindPerl)
|
FIND_PROGRAM(PERL perl DOC "Path to perl command line app: http://perl.org/")
|
||||||
IF(NOT PERL_FOUND)
|
IF(NOT PERL)
|
||||||
MESSAGE(STATUS "Perl not found. You won't be able to build perl bindings.")
|
MESSAGE(STATUS "Perl not found. You won't be able to build perl bindings.")
|
||||||
SET(PHYSFS_BUILD_PERL FALSE)
|
SET(PHYSFS_BUILD_PERL FALSE)
|
||||||
ENDIF(NOT PERL_FOUND)
|
ENDIF(NOT PERL)
|
||||||
|
|
||||||
MACRO(GET_PERL_CONFIG _KEY _VALUE)
|
MACRO(GET_PERL_CONFIG _KEY _VALUE)
|
||||||
IF(PHYSFS_BUILD_PERL)
|
IF(PHYSFS_BUILD_PERL)
|
||||||
MESSAGE(STATUS "Figuring out perl config value '${_KEY}' ...")
|
MESSAGE(STATUS "Figuring out perl config value '${_KEY}' ...")
|
||||||
EXECUTE_PROCESS(
|
EXECUTE_PROCESS(
|
||||||
COMMAND ${PERL_EXECUTABLE} -w -e "use Config; print \$Config{${_KEY}};"
|
COMMAND ${PERL} -w -e "use Config; print \$Config{${_KEY}};"
|
||||||
RESULT_VARIABLE GET_PERL_CONFIG_RC
|
RESULT_VARIABLE GET_PERL_CONFIG_RC
|
||||||
OUTPUT_VARIABLE ${_VALUE}
|
OUTPUT_VARIABLE ${_VALUE}
|
||||||
)
|
)
|
||||||
IF(NOT GET_PERL_CONFIG_RC EQUAL 0)
|
IF(NOT GET_PERL_CONFIG_RC EQUAL 0)
|
||||||
MESSAGE(STATUS "Perl executable ('${PERL_EXECUTABLE}') reported failure: ${GET_PERL_CONFIG_RC}")
|
MESSAGE(STATUS "Perl executable ('${PERL}') reported failure: ${GET_PERL_CONFIG_RC}")
|
||||||
SET(PHYSFS_BUILD_PERL FALSE)
|
SET(PHYSFS_BUILD_PERL FALSE)
|
||||||
ENDIF(NOT GET_PERL_CONFIG_RC EQUAL 0)
|
ENDIF(NOT GET_PERL_CONFIG_RC EQUAL 0)
|
||||||
IF(NOT ${_VALUE})
|
IF(NOT ${_VALUE})
|
||||||
MESSAGE(STATUS "Perl executable ('${PERL_EXECUTABLE}') didn't have a value for '${_KEY}'")
|
MESSAGE(STATUS "Perl executable ('${PERL}') didn't have a value for '${_KEY}'")
|
||||||
SET(PHYSFS_BUILD_PERL FALSE)
|
SET(PHYSFS_BUILD_PERL FALSE)
|
||||||
ENDIF(NOT ${_VALUE})
|
ENDIF(NOT ${_VALUE})
|
||||||
|
|
||||||
|
@ -445,6 +445,8 @@ IF(PHYSFS_BUILD_PERL)
|
||||||
ENDIF(PHYSFS_BUILD_PERL)
|
ENDIF(PHYSFS_BUILD_PERL)
|
||||||
ENDMACRO(GET_PERL_CONFIG)
|
ENDMACRO(GET_PERL_CONFIG)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(PERL)
|
||||||
|
|
||||||
# !!! FIXME: installsitearch might be the wrong location.
|
# !!! FIXME: installsitearch might be the wrong location.
|
||||||
GET_PERL_CONFIG("installarchlib" PERL_INCLUDE_PATH)
|
GET_PERL_CONFIG("installarchlib" PERL_INCLUDE_PATH)
|
||||||
GET_PERL_CONFIG("ccflags" PERL_CCFLAGS)
|
GET_PERL_CONFIG("ccflags" PERL_CCFLAGS)
|
||||||
|
|
Loading…
Reference in New Issue