]> www.ginac.de Git - ginac.git/blobdiff - CMakeLists.txt
build: accept both python 3 and python 2
[ginac.git] / CMakeLists.txt
index 182207d984e28aebcb864bb7311e84835068eb72..7989df14386a53183b1ee88055ef0496f6046fd2 100644 (file)
@@ -167,10 +167,22 @@ endif()
 
 find_program(MAKEINFO makeinfo)
 find_program(FIG2DEV fig2dev)
+find_program(PYTHON python)
+if (NOT PYTHON)
+       find_program(PYTHON python3)
+endif()
+if (NOT PYTHON)
+       message(FATAL_ERROR "Python version 3 or 2 is required")
+endif()
+
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
 add_definitions(-DHAVE_CONFIG_H)
 
+if (NOT LIBEXECDIR)
+       set (LIBEXECDIR "${CMAKE_INSTALL_PREFIX}/libexec")
+endif()
+
 add_subdirectory(ginac)
 add_subdirectory(tools)
 add_subdirectory(check)