Fix CMake test for PyCXX
This commit is contained in:
parent
b7992ed76f
commit
aaae09b5ea
|
@ -73,10 +73,10 @@ SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header fil
|
||||||
SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
|
SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
|
||||||
|
|
||||||
SET(PYCXX_INCLUDE_DIR
|
SET(PYCXX_INCLUDE_DIR
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/src" CACHE PATH
|
"${CMAKE_SOURCE_DIR}/src" CACHE PATH
|
||||||
"Path to the directory containing PyCXX's CXX/Config.hxx include file")
|
"Path to the directory containing PyCXX's CXX/Config.hxx include file")
|
||||||
SET(PYCXX_SOURCE_DIR
|
SET(PYCXX_SOURCE_DIR
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/src/CXX" CACHE PATH
|
"${CMAKE_SOURCE_DIR}/src/CXX" CACHE PATH
|
||||||
"Path to the directory containing PyCXX's cxxextensions.c source file")
|
"Path to the directory containing PyCXX's cxxextensions.c source file")
|
||||||
|
|
||||||
# used as compiler defines
|
# used as compiler defines
|
||||||
|
|
|
@ -25,16 +25,16 @@ set(PYCXX_FOUND "YES")
|
||||||
if(PYCXX_INCLUDE_DIR)
|
if(PYCXX_INCLUDE_DIR)
|
||||||
# headers better be in there
|
# headers better be in there
|
||||||
if(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx")
|
if(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx")
|
||||||
if(PYCXX_FIND_REQUIRED)
|
if(PyCXX_FIND_REQUIRED)
|
||||||
MESSAGE(FATAL_ERROR
|
MESSAGE(FATAL_ERROR
|
||||||
"PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
|
"PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
|
||||||
"${PYCXX_INCLUDE_DIR}")
|
"${PYCXX_INCLUDE_DIR}")
|
||||||
else(PYCXX_FIND_REQUIRED)
|
else(PyCXX_FIND_REQUIRED)
|
||||||
MESSAGE(WARNING
|
MESSAGE(WARNING
|
||||||
"PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
|
"PyCXX: could not find CXX/Config.hxx in PYCXX_INCLUDE_DIR "
|
||||||
"${PYCXX_INCLUDE_DIR}")
|
"${PYCXX_INCLUDE_DIR}")
|
||||||
unset(PYCXX_FOUND)
|
unset(PYCXX_FOUND)
|
||||||
endif(PYCXX_FIND_REQUIRED)
|
endif(PyCXX_FIND_REQUIRED)
|
||||||
endif(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx")
|
endif(NOT EXISTS "${PYCXX_INCLUDE_DIR}/CXX/Config.hxx")
|
||||||
else(PYCXX_INCLUDE_DIR)
|
else(PYCXX_INCLUDE_DIR)
|
||||||
# check in 'standard' places
|
# check in 'standard' places
|
||||||
|
@ -42,14 +42,14 @@ else(PYCXX_INCLUDE_DIR)
|
||||||
${PYTHON_INCLUDE_DIR}
|
${PYTHON_INCLUDE_DIR}
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/..")
|
"${CMAKE_CURRENT_LIST_DIR}/..")
|
||||||
if(NOT PYCXX_INCLUDE_DIR)
|
if(NOT PYCXX_INCLUDE_DIR)
|
||||||
if(PYCXX_FIND_REQUIRED)
|
if(PyCXX_FIND_REQUIRED)
|
||||||
MESSAGE(FATAL_ERROR
|
MESSAGE(FATAL_ERROR
|
||||||
"PyCXX not found; please set PYCXX_INCLUDE_DIR to "
|
"PyCXX not found; please set PYCXX_INCLUDE_DIR to "
|
||||||
"the location of CXX/Config.hxx")
|
"the location of CXX/Config.hxx")
|
||||||
else(PYCXX_FIND_REQUIRED)
|
else(PyCXX_FIND_REQUIRED)
|
||||||
MESSAGE(STATUS "PyCXX not found")
|
MESSAGE(STATUS "PyCXX not found")
|
||||||
unset(PYCXX_FOUND)
|
unset(PYCXX_FOUND)
|
||||||
endif(PYCXX_FIND_REQUIRED)
|
endif(PyCXX_FIND_REQUIRED)
|
||||||
endif(NOT PYCXX_INCLUDE_DIR)
|
endif(NOT PYCXX_INCLUDE_DIR)
|
||||||
endif(PYCXX_INCLUDE_DIR)
|
endif(PYCXX_INCLUDE_DIR)
|
||||||
|
|
||||||
|
@ -57,16 +57,16 @@ endif(PYCXX_INCLUDE_DIR)
|
||||||
if(PYCXX_SOURCE_DIR)
|
if(PYCXX_SOURCE_DIR)
|
||||||
# source directory specified, they'd better be there
|
# source directory specified, they'd better be there
|
||||||
if(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c")
|
if(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c")
|
||||||
if(PYCXX_FIND_REQUIRED)
|
if(PyCXX_FIND_REQUIRED)
|
||||||
MESSAGE(FATAL_ERROR
|
MESSAGE(FATAL_ERROR
|
||||||
"PyCXX: cxxextensions.c not found in PYCXX_INCLUDE_DIR "
|
"PyCXX: cxxextensions.c not found in PYCXX_INCLUDE_DIR "
|
||||||
"${PYCXX_INCLUDE_DIR}")
|
"${PYCXX_INCLUDE_DIR}")
|
||||||
else(PYCXX_FIND_REQUIRED)
|
else(PyCXX_FIND_REQUIRED)
|
||||||
MESSAGE(WARNING
|
MESSAGE(WARNING
|
||||||
"PyCXX: cxxextensions.c not found in PYCXX_INCLUDE_DIR "
|
"PyCXX: cxxextensions.c not found in PYCXX_INCLUDE_DIR "
|
||||||
"${PYCXX_INCLUDE_DIR}")
|
"${PYCXX_INCLUDE_DIR}")
|
||||||
unset(PYCXX_FOUND)
|
unset(PYCXX_FOUND)
|
||||||
endif(PYCXX_FIND_REQUIRED)
|
endif(PyCXX_FIND_REQUIRED)
|
||||||
endif(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c")
|
endif(NOT EXISTS "${PYCXX_SOURCE_DIR}/cxxextensions.c")
|
||||||
else(PYCXX_SOURCE_DIR)
|
else(PYCXX_SOURCE_DIR)
|
||||||
# check in 'standard' places
|
# check in 'standard' places
|
||||||
|
@ -78,14 +78,14 @@ else(PYCXX_SOURCE_DIR)
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/../Src"
|
"${CMAKE_CURRENT_LIST_DIR}/../Src"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/../CXX")
|
"${CMAKE_CURRENT_LIST_DIR}/../CXX")
|
||||||
if(NOT PYCXX_SOURCE_DIR)
|
if(NOT PYCXX_SOURCE_DIR)
|
||||||
if(PYCXX_FIND_REQUIRED)
|
if(PyCXX_FIND_REQUIRED)
|
||||||
MESSAGE(FATAL_ERROR
|
MESSAGE(FATAL_ERROR
|
||||||
"PyCXX not found; please set PYCXX_SOURCE_DIR to "
|
"PyCXX not found; please set PYCXX_SOURCE_DIR to "
|
||||||
"the location of cxxextensions.c")
|
"the location of cxxextensions.c")
|
||||||
else(PYCXX_FIND_REQUIRED)
|
else(PyCXX_FIND_REQUIRED)
|
||||||
MESSAGE(STATUS "PyCXX not found")
|
MESSAGE(STATUS "PyCXX not found")
|
||||||
unset(PYCXX_FOUND)
|
unset(PYCXX_FOUND)
|
||||||
endif(PYCXX_FIND_REQUIRED)
|
endif(PyCXX_FIND_REQUIRED)
|
||||||
endif(NOT PYCXX_SOURCE_DIR)
|
endif(NOT PYCXX_SOURCE_DIR)
|
||||||
endif(PYCXX_SOURCE_DIR)
|
endif(PYCXX_SOURCE_DIR)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user