Commit 6b9380e8 authored by Simon Praetorius's avatar Simon Praetorius
Browse files

Put CMAKE_MODULE_PATH into <module>-config.cmake and remove warnings

parent d5a1ab8f
Pipeline #39308 failed with stage
in 5 minutes and 1 second
# We require version CMake version 3.1 to prevent issues
# with dune_enable_all_packages and older CMake versions.
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.13)
project(dune-vtk CXX)
if(NOT (dune-common_DIR OR dune-common_ROOT OR
......@@ -11,19 +9,17 @@ endif()
#find dune-common and set the module path
find_package(dune-common REQUIRED)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules"
${dune-common_MODULE_PATH})
#include the dune macros
include(DuneMacros)
# start a dune project with information from dune.module
dune_project(dunevtk)
if(ZLB_FOUND)
target_link_libraries(dunevtk PUBLIC ZLIB::ZLIB)
endif()
add_subdirectory(src)
add_subdirectory(dune)
add_subdirectory(doc)
add_subdirectory(lib)
add_subdirectory(cmake/modules)
# if Python bindings are enabled, include necessary sub directories.
......
find_package(ZLIB)
set(HAVE_VTK_ZLIB ${ZLIB_FOUND})
if (${HAVE_VTK_ZLIB})
dune_register_package_flags(COMPILE_DEFINITIONS "ENABLE_VTK_ZLIB=1"
LIBRARIES "${ZLIB_LIBRARIES}"
INCLUDE_DIRS "${ZLIB_INCLUDE_DIRS}")
endif (${HAVE_VTK_ZLIB})
if(ZLIB_FOUND)
dune_register_package_flags(LIBRARIES "ZLIB::ZLIB")
endif()
......@@ -41,7 +41,7 @@
#define DUNE_VTK_VERSION_REVISION @DUNE_VTK_VERSION_REVISION@
/* Define if you have the ZLIB library. */
#cmakedefine HAVE_VTK_ZLIB ENABLE_VTK_ZLIB
#cmakedefine01 HAVE_VTK_ZLIB
/* end dune-vtk
Everything below here will be overwritten
......
# shortcut for creating the Doxyfile.in and Doxyfile
add_doxygen_target()
dune_add_doxygen_target()
dune_add_library("vtktypes" OBJECT
types.cc)
target_sources(dunevtk PRIVATE types.cc)
#install headers
install(FILES
......
dune_add_library("filesystem" OBJECT
filesystem.cc)
target_sources(dunevtk PRIVATE filesystem.cc)
#install headers
install(FILES
......
# OBJECT is needed since CMake 3.0.0
# but it conflicts with shared libs
set(_OBJECT_FLAG "OBJECT")
if(BUILD_SHARED_LIBS)
set(_OBJECT_FLAG "")
endif()
dune_add_library(dunevtk
_DUNE_TARGET_OBJECTS:filesystem_
_DUNE_TARGET_OBJECTS:vtktypes_
ADD_LIBS ${DUNE_LIBS})
Markdown is supported
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