diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-11 04:11:27 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-03-05 19:29:58 +0900 |
commit | dceb004c9be27e6596151cf9165de2989989154b (patch) | |
tree | e0fc66f0d32395725264b75b002ebf946a292013 /ConfigureChecks.cmake | |
parent | babd37358dba926a68da1fc385d2229e21d77dd9 (diff) | |
download | tde-guidance-dceb004c.tar.gz tde-guidance-dceb004c.zip |
Conversion to cmake building system
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 95f2a2d8b59e13dcdcd7e58ed4ec8553f039b45e)
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 72 |
1 files changed, 72 insertions, 0 deletions
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( ) |