diff options
author | gregory guy <g-gregory@gmx.fr> | 2019-06-27 16:35:25 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-06-27 16:35:25 +0200 |
commit | d4a1613e9f119ae68c695ab60f8d9856d1a54a52 (patch) | |
tree | 6de888ef76667e28c81832dc104c19b158859b9b /kstars/ConfigureChecks.cmake | |
parent | 9fb4e1ccde0b89b413bfdc8ae62f8178ecad5483 (diff) | |
download | tdeedu-d4a1613e9f119ae68c695ab60f8d9856d1a54a52.tar.gz tdeedu-d4a1613e9f119ae68c695ab60f8d9856d1a54a52.zip |
Conversion to the cmake building system.
Add includes to UI files to resolve FTBFS.
Signed-off-by: gregory guy <g-gregory@gmx.fr>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kstars/ConfigureChecks.cmake')
-rw-r--r-- | kstars/ConfigureChecks.cmake | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/kstars/ConfigureChecks.cmake b/kstars/ConfigureChecks.cmake new file mode 100644 index 00000000..41184537 --- /dev/null +++ b/kstars/ConfigureChecks.cmake @@ -0,0 +1,67 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + + +##### check for libusb + +if( WITH_LIBUSB ) + + pkg_search_module( LIBUSB libusb libusb-2.0 ) + if( NOT LIBUSB_FOUND ) + tde_message_fatal( "libusb support has been requested, but was not found on your system" ) + endif( NOT LIBUSB_FOUND ) + +endif( WITH_LIBUSB ) + + +##### check for pthread + +find_package ( Threads REQUIRED ) + + +##### check for zlib + +find_package ( ZLIB REQUIRED ) + + +##### check for math lib + +check_library_exists( m sincos "" LIBM ) +if( LIBM ) + set( LIBM m ) +endif( LIBM ) + + +##### check for v4l + +if( WITH_V4L ) + check_include_file( "linux/videodev2.h" HAVE_LINUX_VIDEODEV2_H ) + + if( NOT HAVE_LINUX_VIDEODEV2_H ) + check_include_file( "linux/videodev.h" HAVE_LINUX_VIDEODEV_H ) + if( NOT HAVE_LINUX_VIDEODEV_H ) + tde_message_fatal( "video4linux support is requested, but videodev2.h or videodev.h was not found on your system" ) + endif( ) + endif( ) +endif( ) + + +##### check platform OS + +message( STATUS "Cheking platform - ${CMAKE_SYSTEM_NAME}" ) + +if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" ) + set( OS_Linux true ) + set( LIB_FLI fli_linux-static ) +elseif( ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD|FreeBSD|DragonFly|NetBSD" ) + set( OS_BSD true ) + set( LIB_FLI fli_bsd-static ) +else( ) + set( OS_UNKNOWN true ) + set( LIB_FLI fli_null-static ) +endif( ) |