summaryrefslogtreecommitdiffstats
path: root/kstars/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorgregory guy <[email protected]>2019-06-27 16:35:25 +0200
committerSlávek Banko <[email protected]>2019-06-28 13:45:47 +0200
commitaca01d5a8b7d3de53fa34696e18c91db720a5ab6 (patch)
tree6b9b83c599cc5db58df8041ca5cf812e00bbd25e /kstars/ConfigureChecks.cmake
parent88af19c041ad4f1139f6f0a35cd1a4fe2018425f (diff)
downloadtdeedu-aca01d5a8b7d3de53fa34696e18c91db720a5ab6.tar.gz
tdeedu-aca01d5a8b7d3de53fa34696e18c91db720a5ab6.zip
Conversion to the cmake building system.
Add includes to UI files to resolve FTBFS. Signed-off-by: gregory guy <[email protected]> Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit d4a1613e9f119ae68c695ab60f8d9856d1a54a52)
Diffstat (limited to 'kstars/ConfigureChecks.cmake')
-rw-r--r--kstars/ConfigureChecks.cmake67
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( )