summaryrefslogtreecommitdiffstats
path: root/kalzium/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorgregory guy <g-gregory@gmx.fr>2019-06-27 16:35:25 +0200
committerSlávek Banko <slavek.banko@axis.cz>2019-06-27 16:35:25 +0200
commitd4a1613e9f119ae68c695ab60f8d9856d1a54a52 (patch)
tree6de888ef76667e28c81832dc104c19b158859b9b /kalzium/ConfigureChecks.cmake
parent9fb4e1ccde0b89b413bfdc8ae62f8178ecad5483 (diff)
downloadtdeedu-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 'kalzium/ConfigureChecks.cmake')
-rw-r--r--kalzium/ConfigureChecks.cmake75
1 files changed, 75 insertions, 0 deletions
diff --git a/kalzium/ConfigureChecks.cmake b/kalzium/ConfigureChecks.cmake
new file mode 100644
index 00000000..a51abf1b
--- /dev/null
+++ b/kalzium/ConfigureChecks.cmake
@@ -0,0 +1,75 @@
+###########################################
+# #
+# Improvements and feedback are welcome #
+# #
+# This file is released under GPL >= 3 #
+# #
+###########################################
+
+
+##### check for ocaml/facile
+
+if( WITH_OCAML_SOLVER )
+
+ if( NOT DEFINED HAVE_OCAML )
+ message( STATUS "Search for ocaml" )
+
+ foreach( _exec ocamlc ocamldep ocamlopt )
+ string( TOUPPER "${_exec}_EXECUTABLE" _exec_var )
+ if( NOT DEFINED ${_exec_var} )
+ find_program( ${_exec_var} NAMES ${_exec} )
+ if( NOT ${_exec_var} )
+ tde_message_fatal( "${_exec} is requested, but was not found on your system" )
+ endif( )
+ endif( )
+ endforeach( )
+
+ if( NOT DEFINED OCAML_BASEDIR )
+ execute_process(
+ COMMAND ${OCAMLOPT_EXECUTABLE} -where
+ OUTPUT_VARIABLE OCAML_BASEDIR
+ ERROR_VARIABLE OCAML_BASEDIR
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ ERROR_STRIP_TRAILING_WHITESPACE
+ )
+ if( EXISTS ${OCAML_BASEDIR} AND IS_DIRECTORY ${OCAML_BASEDIR} )
+ set( OCAML_BASEDIR ${OCAML_BASEDIR} CACHE PATH "Ocaml base directory" )
+ set( OCAML_LIBRARY_DIR ${OCAML_BASEDIR} CACHE PATH "Ocaml libraries directory" )
+ else( )
+ tde_message_fatal( "Ocaml is requested, but was not found on your system" )
+ endif( )
+ endif( )
+
+ set( HAVE_OCAML 1 CACHE INTERNAL "" )
+ message( STATUS "Search for ocaml - found" )
+ endif( )
+
+
+ if( NOT DEFINED HAVE_FACILE )
+ message( STATUS "Search for facile" )
+
+ if( NOT DEFINED FACILE_LIBRARIES )
+ find_library( FACILE_LIBRARIES
+ NAMES facile.a
+ HINTS ${OCAML_BASEDIR}
+ PATH_SUFFIXES facile ocaml/facile
+ )
+ endif( )
+
+ if( NOT DEFINED FACILE_INCLUDE_DIR )
+ find_path( FACILE_INCLUDE_DIR
+ NAMES facile.cmi
+ HINTS ${OCAML_BASEDIR}
+ PATH_SUFFIXES facile lib/ocaml/facile
+ )
+ endif( )
+
+ if( NOT DEFINED FACILE_LIBRARIES OR NOT DEFINED FACILE_INCLUDE_DIR )
+ tde_message_fatal( "Facile is requested, but was not found on your system" )
+ endif( )
+
+ set( HAVE_FACILE 1 CACHE INTERNAL "Enable build with ocaml/facile" )
+ message( STATUS "Search for facile - found" )
+ endif( )
+
+endif( WITH_OCAML_SOLVER )