You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-guidance/ConfigureChecks.cmake

105 lines
2.9 KiB

###########################################
# #
# 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 )
##### X11 lib
find_package( X11 COMPONENTS Xxf86vm Xrandr Xscreensaver )
##### look for pytdeextensions
find_path( PYTHONIZE_INCLUDE_DIR pythonize.h
HINTS /opt/trinity/include
)
find_library( PYTHONIZE_LIBRARY pythonize
HINTS /opt/trinity/lib /opt/trinity/lib64
)
if( PYTHONIZE_INCLUDE_DIR AND PYTHONIZE_LIBRARY )
set( PYTHONIZE_INCLUDE_DIRS "${PYTHONIZE_INCLUDE_DIR}" )
set( PYTHONIZE_LIBRARIES ${PYTHONIZE_LIBRARY} )
else()
tde_message_fatal( "Pythonize (pytdeextensions) is required but was not found on your system" )
endif( PYTHONIZE_INCLUDE_DIR AND PYTHONIZE_LIBRARY )
##### look for Python
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()
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_INCLUDE_DIRS "${Python_INCLUDE_DIRS}" )
set( PYTHON_LIBRARIES ${Python_LIBRARIES} )
endif( ${CMAKE_VERSION} VERSION_LESS "3.12" )
if( BUILD_IXF86 ) # we should have a Python Interpreter at this point
execute_process(
COMMAND ${Python_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set( PYTHON_SITE_PACKAGES "${PYTHON_SITE_PACKAGES}" CACHE INTERNAL "" )
endif( BUILD_IXF86 )
##### look for tdepyuic
if( BUILD_MOUNTCONFIG )
find_program( PYUIC_EXECUTABLE tdepyuic
HINTS /opt/trinity/bin
)
if( PYUIC_EXECUTABLE-NOTFOUND )
tde_message_fatal( "The Python User Interface Compiler (tdepyuic) is required but was not found on your system" )
endif()
endif( BUILD_MOUNTCONFIG )
##### look for Hal
pkg_search_module( HAL_LAYER hal )
if( HAL_LAYER_FOUND )
set( WITH_HAL 1 )
endif()
##### look for Grub Legacy
if( BUILD_GRUB )
find_file( GRUB "/boot/grub/menu.lst" )
if( GRUB-NOTFOUND )
tde_message_fatal( "grubconfig is available for Grub Legacy only" )
endif()
endif( BUILD_GRUB )