Commit 7ba7f72f authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Merge KalziumConfigureChecks with main CMake configuration.

Fixes the problem of searching different versions of Avogadro.
Makes CMake code much easier to read, since now all checks are at
one place.
parent 98edb998
......@@ -10,12 +10,29 @@ include(KDECMakeSettings)
include(FeatureSummary)
include(ECMInstallIcons)
include(ECMMarkNonGuiExecutable)
include(CheckIncludeFiles)
find_package(OpenBabel2 REQUIRED)
find_package(Gettext REQUIRED)
find_package(PythonInterp REQUIRED)
find_package(PkgConfig)
find_package(OpenBabel2)
find_package(AvogadroLibs)
find_package(Eigen3)
find_package(OCaml)
find_package(Libfacile)
pkg_check_modules(CHEMICAL_MIME_DATA chemical-mime-data)
check_include_files(ieeefp.h HAVE_IEEEFP_H)
# create configuration file
set(HAVE_FACILE ${LIBFACILE_FOUND})
set(HAVE_OPENBABEL2 ${OPENBABEL2_FOUND})
set(HAVE_EIGEN ${EIGEN3_FOUND})
set(HAVE_AVOGADRO ${AvogadroLibs_FOUND})
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/config-kalzium.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/config-kalzium.h
)
include_directories(${AvogadroLibs_INCLUDE_DIRS})
......@@ -70,9 +87,6 @@ if(MSVC)
add_definitions(-DUSING_DYNAMIC_LIBS)
endif(MSVC)
include(KalziumConfigureChecks.cmake)
if (OPENBABEL2_FOUND AND AvogadroLibs_FOUND AND EIGEN3_FOUND)
# avoid compilerwarnings about redefinitions
# todo: use check_function_exits() ?
......
include(CheckIncludeFiles)
include(CheckFunctionExists)
find_package(OCaml)
find_package(Libfacile)
find_package(OpenBabel2)
find_package(Eigen3)
find_package(Avogadro 1.0.0 NO_MODULE)
find_package(PkgConfig)
pkg_check_modules(CHEMICAL_MIME_DATA chemical-mime-data)
include(CheckIncludeFiles)
check_include_files(ieeefp.h HAVE_IEEEFP_H)
set(HAVE_FACILE ${LIBFACILE_FOUND})
set(HAVE_OPENBABEL2 ${OPENBABEL2_FOUND})
set(HAVE_EIGEN ${EIGEN3_FOUND})
set(HAVE_AVOGADRO ${Avogadro_FOUND})
#macro_bool_to_01(LIBFACILE_FOUND HAVE_FACILE)
#macro_bool_to_01(OPENBABEL2_FOUND HAVE_OPENBABEL2)
#macro_bool_to_01(EIGEN3_FOUND HAVE_EIGEN)
#macro_bool_to_01(Avogadro_FOUND HAVE_AVOGADRO)
# at the end, output the configuration
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/config-kalzium.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/config-kalzium.h
)
#set_package_properties(OCAML_FOUND "OCaml" "http://caml.inria.fr/" FALSE "OCaml is needed by Kalzium for the Equation Solver")
#(OCAML_FOUND "OCaml" "OCaml is needed by Kalzium for the Equation Solver" "http://caml.inria.fr/" FALSE "" "")
#set_package_properties(LIBFACILE_FOUND "LibFacile" "libfacile is needed by Kalzium for the Equation Solver." "http://www.recherche.enac.fr/log/facile/" FALSE "" "")
#set_package_properties(OPENBABEL2_FOUND "OpenBabel2" "OpenBabel is needed by Kalzium for the 3D-molecule viewer" "http://openbabel.sourceforge.net/" FALSE "2.2" "")
#set_package_properties(EIGEN3_FOUND "Eigen3" "A generic C++ template library for dense and sparse matrices" "http://eigen.tuxfamily.org" FALSE "3.0.0" "")
#set_package_properties(Avogadro_FOUND "Avogadro" "Advanced molecular editor" "http://avogadro.openmolecules.net" FALSE "1.0" "")
#set_package_properties(CHEMICAL_MIME_DATA_FOUND "Chemical mime data" "Needed to open CML molecules from the file manager" "http://chemical-mime.sourceforge.net/" FALSE "" "")
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment