Fix standalone installation, headers and private predicate symbols. --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,10 +37,12 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +include(GNUInstallDirs) + list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") set(MCUT_MAJOR 1) -set(MCUT_MINOR 2) +set(MCUT_MINOR 3) set(MCUT_PATCH 0) set( MCUT_VERSION "${MCUT_MAJOR}.${MCUT_MINOR}.${MCUT_PATCH}" ) @@ -260,18 +262,18 @@ # dynamic libs # - install(TARGETS ${mpn_shared_lib_name} + install(TARGETS ${target_name} LIBRARY - DESTINATION lib/shared + DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dynamic_libraries) else() # # static libs # - install(TARGETS ${mpn_static_lib_name} + install(TARGETS ${target_name} ARCHIVE - DESTINATION lib/static + DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT static_libraries) endif() @@ -279,14 +281,9 @@ # headers # install(FILES ${MCUT_INCLUDE_DIR}/mcut/mcut.h ${MCUT_INCLUDE_DIR}/mcut/platform.h - DESTINATION include/mcut + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mcut COMPONENT headers) -install(FILES - ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt - ${CMAKE_CURRENT_SOURCE_DIR}/README.md - DESTINATION ./ - COMPONENT text_files) # # notify CPack of the names of all of the components in the project --- a/include/mcut/internal/frontend.h +++ b/include/mcut/internal/frontend.h @@ -51,6 +51,7 @@ #include "mcut/mcut.h" +#include #include #include #include --- a/source/math.cpp +++ b/source/math.cpp @@ -35,6 +35,7 @@ #include "mcut/internal/math.h" #include // std::sort +#include #include #include // std::make_tuple std::get<> --- a/source/shewchuk.c +++ b/source/shewchuk.c @@ -1420,7 +1420,7 @@ /* */ /*****************************************************************************/ -int compress(elen, e, h) /* e and h may be the same. */ +static int compress(elen, e, h) /* e and h may be the same. */ int elen; REAL *e; REAL *h; @@ -5686,7 +5686,7 @@ /* */ /*****************************************************************************/ -int compress(elen, e, h) /* e and h may be the same. */ +static int compress(elen, e, h) /* e and h may be the same. */ int elen; REAL* e; REAL* h;