...
 
Commits (8)
......@@ -133,7 +133,13 @@ else()
set (OPENMESH_LIBRARY_DIR "${_OPENMESH_LIBRARY_DIR}" CACHE PATH "The directory where the OpenMesh libraries can be found.")
endif()
add_subdirectory (Doc)
if ( NOT DEFINED OPENMESH_DOCS )
set( OPENMESH_DOCS true CACHE BOOL "Enable or disable building of documentation" )
endif()
if (OPENMESH_DOCS)
add_subdirectory (Doc)
endif()
# ========================================================================
# Bundle generation (Targets exist, now configure them)
......@@ -175,6 +181,20 @@ endif()
# ========================================================================
# Generate openmesh.pc file
set(DEST_DIR "${CMAKE_INSTALL_PREFIX}")
set(PRIVATE_LIBS "-lOpenMeshCore -lOpenMeshTools")
configure_file("openmesh.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/openmesh.pc" @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openmesh.pc DESTINATION libdata/pkgconfig)
# generate target file
install(EXPORT OpenMeshConfig DESTINATION share/OpenMesh/cmake)
export(TARGETS OpenMeshCore OpenMeshTools FILE OpenMeshConfig.cmake)
# display results
acg_print_configure_header (OPENMESH "OpenMesh")
......@@ -14,6 +14,12 @@
<li>PropertyManager: add hasProperty function</li>
</ul>
<b>Build System</b>
<ul>
<li>Generate OpenMeshConfig.cmake (Thanks to Thibault Payet for the patch)</li>
<li>Support building on FreeBSD (Thanks to Thibault Payet for the patch)</li>
</ul>
</tr>
......
prefix=@DEST_DIR@
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Name: libOpenMesh
Description: OpenMesh library
Version: @OPENMESH_VERSION_MAJOR@.@OPENMESH_VERSION_MINOR@
Libs: -L${libdir} @PRIVATE_LIBS@
Cflags: -I${includedir}
......@@ -132,4 +132,12 @@ install(DIRECTORY IO/
PATTERN "Debian*" EXCLUDE )
endif ()
target_include_directories(OpenMeshCore PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:include>)
install(TARGETS OpenMeshCore EXPORT OpenMeshConfig
ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR}
LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}
RUNTIME DESTINATION ${ACG_PROJECT_BINDIR})
......@@ -115,4 +115,12 @@ install(FILES Utils/getopt.h DESTINATION include/OpenMesh/Tools/Utils)
endif ()
target_include_directories(OpenMeshTools PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:include>)
install(TARGETS OpenMeshTools EXPORT OpenMeshConfig
ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR}
LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}
RUNTIME DESTINATION ${ACG_PROJECT_BINDIR})
......@@ -183,7 +183,7 @@ protected:
};
// ----------------------------------------------------------- gettimeofday ----
#elif (defined(__GNUC__) || (defined(__INTEL_COMPILER) && !defined(WIN32))) && !defined(__MINGW32__)
#elif (defined(__GNUC__) && !defined(__FreeBSD__) || (defined(__INTEL_COMPILER) && !defined(WIN32))) && !defined(__MINGW32__)
# include <sys/time.h>
# include <sys/resource.h>
......@@ -271,7 +271,7 @@ Timer::Timer(void) :
# else
impl_ = new TimerImplPosix<CLOCK_REALTIME>;
# endif
#elif (defined(__GNUC__) || (defined(__INTEL_COMPILER) && !defined(WIN32)) ) && !defined(__MINGW32__)
#elif (defined(__GNUC__) && !defined(__FreeBSD__) || (defined(__INTEL_COMPILER) && !defined(WIN32)) ) && !defined(__MINGW32__)
impl_ = new TimerImplGToD;
#else
impl_ = new TimerImplStd;
......
......@@ -21,7 +21,7 @@
#endif
#elif defined __APPLE__
#elif defined __APPLE__ || defined(__FreeBSD__)
#include <unistd.h>
#else
#include <getopt.h>
......