aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/FindPython.cmake
diff options
context:
space:
mode:
authorArne Morten Kvarving <cptspiff@gmail.com>2017-01-16 00:11:24 +0100
committerArne Morten Kvarving <cptspiff@gmail.com>2017-01-19 15:55:52 +0100
commitda31ddeede623fc3eb632b32f2d5bd60a279c64c (patch)
tree93fa33120e4fed1bdbbc2d6cd035e9a36f8cbd06 /cmake/modules/FindPython.cmake
parent22cf5fa45f927397eb93092daf9e67558cd483e5 (diff)
restore the ability to build without python and add cmake option
Diffstat (limited to 'cmake/modules/FindPython.cmake')
-rw-r--r--cmake/modules/FindPython.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/modules/FindPython.cmake b/cmake/modules/FindPython.cmake
index 75dcd6cfbb..4f1b49abe0 100644
--- a/cmake/modules/FindPython.cmake
+++ b/cmake/modules/FindPython.cmake
@@ -29,11 +29,11 @@ else()
list(APPEND PYTHON_LIBRARIES ${PC_PYTHON_STATIC_LIBRARIES})
endif()
-
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PYTHON REQUIRED_VARS PYTHON_INCLUDE_DIR PYTHON_LIBRARY PYTHON_LIBRARIES)
if(PYTHON_FOUND)
set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR})
+ list(APPEND PYTHON_DEFINITIONS -DHAS_PYTHON=1)
endif()
mark_as_advanced(PYTHON_EXECUTABLE PYTHON_INCLUDE_DIRS PYTHON_INCLUDE_DIR PYTHON_LIBRARY PYTHON_LIBRARIES PYTHON_LDFLAGS FFI_LIBRARY EXPAT_LIBRARY INTL_LIBRARY GMP_LIBRARY)