From 95f2a2d8b59e13dcdcd7e58ed4ec8553f039b45e Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 11 Dec 2023 04:11:27 +0900 Subject: Conversion to cmake building system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michele Calgaro Signed-off-by: Slávek Banko --- ConfigureChecks.cmake | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 ConfigureChecks.cmake (limited to 'ConfigureChecks.cmake') diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..0bd03ff --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,72 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + + +# required stuff +find_package( TQt ) +find_package( TDE ) + +tde_setup_architecture_flags( ) + +include(TestBigEndian) +test_big_endian(WORDS_BIGENDIAN) + +tde_setup_largefiles( ) + + +##### check for gcc visibility support + +if( WITH_GCC_VISIBILITY ) + tde_setup_gcc_visibility( ) +endif( WITH_GCC_VISIBILITY ) + + +##### find python libraries + +if( ${CMAKE_VERSION} VERSION_LESS "3.12" ) + find_package( PythonInterp ) + find_package( PythonLibs ) + if( NOT PYTHONLIBS_FOUND ) + tde_message_fatal( "Python is required, but was not found on your system" ) + endif( NOT PYTHONLIBS_FOUND ) +else( ) + find_package( Python COMPONENTS Interpreter Development ) + if( NOT Python_Development_FOUND ) + tde_message_fatal( "Python is required, but was not found on your system" ) + endif( ) + set( PYTHON_EXECUTABLE ${Python_EXECUTABLE} ) + set( PYTHON_INCLUDE_DIR ${Python_INCLUDE_DIRS} ) + set( PYTHON_LIBRARIES ${Python_LIBRARIES} ) +endif( ) + + +##### find python setuptools location and set tde-guidance package location + +execute_process( + COMMAND "${PYTHON_EXECUTABLE}" -c "import os; import setuptools; print(os.path.dirname(setuptools.__path__[0]))" + OUTPUT_VARIABLE TDE_GUIDANCE_DIST_PKG_PATH + OUTPUT_STRIP_TRAILING_WHITESPACE +) +set( TDE_GUIDANCE_DIST_PKG_PATH ${TDE_GUIDANCE_DIST_PKG_PATH}/tde-guidance ) + + +##### find pytquic executable + +find_program( PYTQUIC_EXECUTABLE NAMES pytquic ) + +if( NOT PYTQUIC_EXECUTABLE ) + tde_message_fatal( "pytquic is required, but was not found on your system" ) +endif() + + +##### find pythonize library + +find_library( PYTHONIZE_LIBRARIES pythonize HINTS ${LIB_INSTALL_DIR} ) +if( "${PYTHONIZE_LIBRARIES}" STREQUAL "PYTHONIZE_LIBRARIES-NOTFOUND" ) + tde_message_fatal( "pythonize library is required, but was not found on your system" ) +endif( ) -- cgit v1.2.1