...
 
Commits (8)
cmake_minimum_required(VERSION 2.6)
PROJECT(meshalyzer)
find_package(FLTK REQUIRED NO_MODULE)
include(${FLTK_USE_FILE})
link_libraries(fltk_SHARED fltk_images_SHARED fltk_gl_SHARED)
include(FindZLIB)
if (ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIR})
link_libraries(${ZLIB_LIBRARIES})
else (ZLIB_FOUND)
message(FATAL_ERROR "Couldn't find development files for zlib")
endif (ZLIB_FOUND)
include(FindPNG)
if (PNG_FOUND)
include_directories(${PNG_INCLUDE_DIR})
link_libraries(${PNG_LIBRARIES})
add_definitions(${PNG_DEFINITIONS})
else (PNG_FOUND)
message(FATAL_ERROR "Couldn't find development files for PNG")
endif (PNG_FOUND)
if (CYGWIN)
add_definitions(-DNOMINMAX)
endif (CYGWIN)
# No common library for pthreads yet.
find_library(PTHREAD_LIB pthread)
if (PTHREAD_LIB)
link_libraries(${PTHREAD_LIB})
else (PTHREAD_LIB)
message(FATAL_ERROR "Couldn't find pthread library")
endif (PTHREAD_LIB)
#Check for GLU
find_library(GLU_LIB GLU)
if (GLU_LIB)
link_libraries(${GLU_LIB})
else (GLU_LIB)
message(FATAL_ERROR "Couldn't find GLU")
endif (GLU_LIB)
option(USE_GLFRAMEBUFFERS "Use the glFramebuffer* extensions to render PNG images. It should be superior to onscreen rendering, but on nvidia cards it has problems." OFF)
if (NOT USE_GLFRAMEBUFFERS)
add_definitions(-DONSCREEN_DUMP)
endif (NOT USE_GLFRAMEBUFFERS)
# ok, now adding everything else
add_definitions(
-DOBJ_CLASS
-D_REENTRANT
-DNOMINMAX
)
add_definitions(-fopenmp)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fopenmp")
include_directories(.)
fltk_wrap_ui(meshalyzer
ClipPlane.fl
colourchoice.fl
DataOpacity.fl
HiLiteWinInfo.fl
isosurf.fl
plottingwin.fl
Sequence.fl
trimesh.fl
TimeLink.fl
HDF5DataBrowser.fl
cmake_minimum_required(VERSION 3.10)
project(meshalyzer
VERSION 0.1
DESCRIPTION "Graphical program for display time dependent data on 3D finite elment meshes"
LANGUAGES C CXX
)
add_executable(meshalyzer
${meshalyzer_FLTK_UI_SRCS}
AuxGrid.cc
Colourscale.cc
Connection.cc
ContCable.cc
CutSurfaces.cc
DrawingObjects.cc
FileType.cc
Fl_Gl_Tb_Window.C
gl2ps.c
Graph.cc
Hexahedron.cc
IsoLines.cc
IsoSurface.cc
IGBheader.cc
main.cc
Matrix4x4.C
Model.cc
ModInt.C
Mouse.C
Myslider.cc
MyValueInput.cc
PlotWin.cc
PNGwrite.cc
Point.cc
PolyGon.cc
Prism.cc
Pyramid.cc
Quadrilateral.cc
Surfaces.cc
Region.cc
TBmeshWin.cc
Tetrahedral.cc
Trackball.C
Triangle.cc
VecData.cc
Vector3D.C
Vector4D.C
GLee.c
Orienter.cc
)
install(TARGETS meshalyzer RUNTIME DESTINATION bin)
set(CPACK_PACKAGE_VERSION_MAJOR 0)
set(CPACK_PACKAGE_VERSION_MINOR 0)
set(CPACK_PACKAGE_VERSION_PATCH r3675)
set(CPACK_PACKAGE_VENDOR cardiosolv)
set(CPACK_STRIP_FILES ON)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Visualization software for CARP files.")
set(CPACK_PACKAGE_DESCRIPTION "
Meshalyzer is an OpenGL scientific visualization program for CARP data
files. It is designed to read in CARP finite element meshes and the .dat/.igb
files produced by CARP.
For more information, go to http://cardiosolv.com
")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Robert Blake <rblake@cardiosolv.com>")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libfltk1.3 (>=1.3.0), zlib1g, libglu1-mesa")
set(CPACK_DEBIAN_PACKAGE_SECTION "science")
set(RPM_DISTRIBUTION "centos" CACHE STRING "Linux distribution for RPM, either centos, opensuse, or fedora")
if (RPM_DISTRIBUTION STREQUAL "centos")
set(CPACK_RPM_PACKAGE_REQUIRES "fltk >= 1.3, zlib, freeglut, libpng")
elseif(RPM_DISTRIBUTION STREQUAL "opensuse")
set(CPACK_RPM_PACKAGE_REQUIRES "libfltk1 >= 1.3, zlib, freeglut, libpng14-14")
elseif(RPM_DISTRIBUTION STREQUAL "fedora")
set(CPACK_RPM_PACKAGE_REQUIRES "fltk >= 1.3, zlib, freeglut, libpng >= 1.2.44")
else(RPM_DISTRIBUTION STREQUAL "centos")
message(SEND_ERROR "Invalid RPM distribution")
endif(RPM_DISTRIBUTION STREQUAL "centos")
include(CPack)
add_subdirectory(src)
FROM ubuntu:18.04
RUN export DEBIAN_FRONTEND="noninteractive" && \
apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
file \
fluid \
freeglut3-dev \
g++ \
git \
libfltk1.3-dev \
libglew-dev \
libglu1-mesa-dev \
libgomp1 \
libosmesa6-dev \
libpng-dev \
libvtk7-dev \
make \
pkg-config \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /meshalyzer
COPY . .
RUN cmake . \
&& make \
&& cpack -G DEB
find_package(FLTK REQUIRED)
include_directories(${FLTK_INCLUDE_DIR})
find_package(ZLIB REQUIRED)
include(FindZLIB)
if (ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIR})
link_libraries(${ZLIB_LIBRARIES})
else (ZLIB_FOUND)
message(FATAL_ERROR "Couldn't find development files for zlib")
endif (ZLIB_FOUND)
find_package(PNG REQUIRED)
include(FindPNG)
if (PNG_FOUND)
include_directories(${PNG_INCLUDE_DIR})
link_libraries(${PNG_LIBRARIES})
add_definitions(${PNG_DEFINITIONS})
else (PNG_FOUND)
message(FATAL_ERROR "Couldn't find development files for PNG")
endif (PNG_FOUND)
if (CYGWIN)
add_definitions(-DNOMINMAX)
endif (CYGWIN)
# No common library for pthreads yet.
find_library(PTHREAD_LIB pthread)
if (PTHREAD_LIB)
link_libraries(${PTHREAD_LIB})
else (PTHREAD_LIB)
message(FATAL_ERROR "Couldn't find pthread library")
endif (PTHREAD_LIB)
#VTK
option(USE_VTK "Build with VTK" TRUE)
if (USE_VTK)
set(MESHALYZER_VTK_COMPONENTS
vtkCommonCore
vtkIOCore
vtkIOLegacy
vtkIOXML
)
find_package(VTK REQUIRED COMPONENTS ${MESHALYZER_VTK_COMPONENTS})
if (VTK_FOUND)
message(STATUS "Found VTK components: ${VTK_LIBRARIES}")
include_directories(${VTK_INCLUDE_DIRS})
link_libraries(${VTK_LIBRARIES})
add_definitions(-DUSE_VTK)
else (VTK_FOUND)
message(FATAL_ERROR "Couldn't find VTK library")
endif (VTK_FOUND)
endif (USE_VTK)
#Check for GLUT
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
find_package(GLEW REQUIRED)
#find_package(GLU)
include_directories( ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS} ${GLU_INCLUDE_DIRS})
link_libraries(${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${GLEW_LIBRARIES} ${GLU_LIBRARIES})
find_library(GLU_LIB GLU)
if (GLU_LIB)
link_libraries(${GLU_LIB})
else (GLU_LIB)
message(FATAL_ERROR "Couldn't find GLU")
endif (GLU_LIB)
option(USE_GLFRAMEBUFFERS "Use the glFramebuffer* extensions to render PNG images. It should be superior to onscreen rendering, but on nvidia cards it has problems." OFF)
if (NOT USE_GLFRAMEBUFFERS)
add_definitions(-DONSCREEN_DUMP)
endif (NOT USE_GLFRAMEBUFFERS)
# ok, now adding everything else
add_definitions(
-DOBJ_CLASS
-D_REENTRANT
-DNOMINMAX
-MMD
-lGL
-lGLU
-lGLEW
-lglfw
)
find_package(OpenMP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++11")
include_directories(${CMAKE_CURRENT_SOURCE_DIR} )
fltk_wrap_ui(meshalyzer
ClipPlane.fl
DeadDataGUI.fl
HDF5DataBrowser.fl
Sequence.fl
colourchoice.fl
plottingwin.fl
DataOpacity.fl
FlyBy.fl
HiLiteWinInfo.fl
TimeLink.fl
isosurf.fl
trimesh.fl
)
add_executable(meshalyzer
${meshalyzer_FLTK_UI_SRCS}
Frame.cc
IsoLines.cc
Myslider.cc
Point.cc
Quadrilateral.cc
Tetrahedral.cc
short_float.cc
ColourGroup.cc
CutSurfaces.cc
Graph.cc
IsoSurface.cc
Orienter.cc
PolyGon.cc
Region.cc
Triangle.cc
Colourscale.cc
DrawingObjects.cc
Hexahedron.cc
Model.cc
PNGwrite.cc
Prism.cc
Surfaces.cc
VecData.cc
Connection.cc
FileType.cc
IGBheader.cc
MyValueInput.cc
PlotWin.cc
Pyramid.cc
TBmeshWin.cc
main.cc
Fl_Gl_Tb_Window.C
Matrix4x4.C
ContCable.cc
ModInt.C
Mouse.C
AuxGrid.cc
Trackball.C
Vector3D.C
Vector4D.C
)
target_link_libraries(meshalyzer ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${GLEW_LIBRARIES} ${GLU_LIBRARIES} ${FLTK_LIBRARIES})
if(OpenMP_CXX_FOUND)
target_link_libraries(meshalyzer ${OpenMP_CXX_LIBRARIES})
endif()
install(TARGETS meshalyzer RUNTIME DESTINATION bin)
set(CPACK_PACKAGE_VERSION_MAJOR 0)
set(CPACK_PACKAGE_VERSION_MINOR 1)
set(CPACK_STRIP_FILES ON)
set(CPACK_PACKAGE_CONTACT "jorge.arciniegas@kit.edu")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Visualization software for CARP files.")
set(CPACK_PACKAGE_DESCRIPTION "
Meshalyzer is an OpenGL scientific visualization program for openCARP data
files. It is designed to read in openCARP finite element meshes and the .dat/.igb
files produced by openCARP.
For more information, go to http://opencarp.org
")
SET(CPACK_DEBIAN_PACKAGE_SECTION "devel")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "freeglut3-dev, libfltk1.3-dev (>=1.3.4-6), libglew-dev, libglu1-mesa-dev, libgomp1, libosmesa6-dev, libpng-dev, libvtk7-dev")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
include(CPack)