diff --git a/libsrc/core/CMakeLists.txt b/libsrc/core/CMakeLists.txt index c43a79ab..46a2230b 100644 --- a/libsrc/core/CMakeLists.txt +++ b/libsrc/core/CMakeLists.txt @@ -29,6 +29,7 @@ install(TARGETS ngcore DESTINATION ${NG_INSTALL_DIR} COMPONENT netgen) if(USE_PYTHON) target_compile_definitions(ngcore PUBLIC NETGEN_PYTHON) target_include_directories(ngcore PUBLIC ${PYTHON_INCLUDE_DIRS}) + target_link_libraries(ngcore PUBLIC ${PYTHON_LIBRARIES}) endif(USE_PYTHON) install(FILES ngcore.hpp archive.hpp type_traits.hpp version.hpp ngcore_api.hpp logging.hpp @@ -41,7 +42,7 @@ endif(ENABLE_CPP_CORE_GUIDELINES_CHECK) if(USE_PYTHON) pybind11_add_module(pyngcore SHARED python_ngcore.cpp) - target_link_libraries(pyngcore PUBLIC ngcore) + target_link_libraries(pyngcore PUBLIC ngcore ${PYTHON_LIBRARIES}) set_target_properties(pyngcore PROPERTIES INSTALL_RPATH "${NG_RPATH_TOKEN}/${NETGEN_PYTHON_RPATH}") install(TARGETS pyngcore DESTINATION ${NG_INSTALL_DIR_PYTHON} COMPONENT netgen) endif(USE_PYTHON) diff --git a/libsrc/core/archive.hpp b/libsrc/core/archive.hpp index 2848b8f1..6a4a0792 100644 --- a/libsrc/core/archive.hpp +++ b/libsrc/core/archive.hpp @@ -943,7 +943,7 @@ namespace ngcore }; template - NGCORE_API auto NGSPickle() + auto NGSPickle() { return pybind11::pickle([](T* self) { diff --git a/libsrc/core/symboltable.hpp b/libsrc/core/symboltable.hpp index 582a7a37..fdab713c 100644 --- a/libsrc/core/symboltable.hpp +++ b/libsrc/core/symboltable.hpp @@ -19,7 +19,7 @@ namespace ngcore Complexity by name access is linear, by index is constant. */ template - class NGCORE_API SymbolTable + class SymbolTable { std::vector names; std::vector data; diff --git a/libsrc/core/utils.cpp b/libsrc/core/utils.cpp index ae831447..82fcfb31 100644 --- a/libsrc/core/utils.cpp +++ b/libsrc/core/utils.cpp @@ -16,6 +16,7 @@ namespace ngcore nullptr, nullptr, &status); } +#endif double ticks_per_second = [] () noexcept { @@ -36,5 +37,3 @@ namespace ngcore } // namespace ngcore -#endif - diff --git a/libsrc/geom2d/CMakeLists.txt b/libsrc/geom2d/CMakeLists.txt index 754c79fb..26d0db92 100644 --- a/libsrc/geom2d/CMakeLists.txt +++ b/libsrc/geom2d/CMakeLists.txt @@ -9,6 +9,8 @@ if(NOT WIN32) install( TARGETS geom2d ${NG_INSTALL_DIR}) endif(NOT WIN32) +target_link_libraries(geom2d ngcore) + if(USE_GUI) add_library(geom2dvis ${NG_LIB_TYPE} vsgeom2d.cpp) if(NOT WIN32) diff --git a/libsrc/occ/CMakeLists.txt b/libsrc/occ/CMakeLists.txt index a244e85b..1f093ad8 100644 --- a/libsrc/occ/CMakeLists.txt +++ b/libsrc/occ/CMakeLists.txt @@ -8,11 +8,13 @@ if(USE_GUI) add_library(occvis ${NG_LIB_TYPE} vsocc.cpp) endif(USE_GUI) +target_link_libraries(occ PUBLIC ngcore) + if(NOT WIN32) - target_link_libraries( occ ngcore ${OCC_LIBRARIES} ${PYTHON_LIBRARIES}) + target_link_libraries( occ PUBLIC ${OCC_LIBRARIES} ${PYTHON_LIBRARIES}) install( TARGETS occ ${NG_INSTALL_DIR}) if (USE_GUI) - target_link_libraries( occvis occ ) + target_link_libraries( occvis PUBLIC occ ) install( TARGETS occvis ${NG_INSTALL_DIR}) endif(USE_GUI) endif(NOT WIN32) diff --git a/libsrc/stlgeom/CMakeLists.txt b/libsrc/stlgeom/CMakeLists.txt index 7b87a649..8925c828 100644 --- a/libsrc/stlgeom/CMakeLists.txt +++ b/libsrc/stlgeom/CMakeLists.txt @@ -4,10 +4,13 @@ add_library(stl ${NG_LIB_TYPE} ) if(NOT WIN32) - target_link_libraries( stl ngcore mesh ${PYTHON_LIBRARIES}) + target_link_libraries( stl mesh ${PYTHON_LIBRARIES}) install( TARGETS stl ${NG_INSTALL_DIR}) endif(NOT WIN32) +target_link_libraries( stl ngcore ) + + if(USE_GUI) add_library(stlvis ${NG_LIB_TYPE} vsstl.cpp diff --git a/nglib/CMakeLists.txt b/nglib/CMakeLists.txt index 5f705c8c..7253230a 100644 --- a/nglib/CMakeLists.txt +++ b/nglib/CMakeLists.txt @@ -29,7 +29,8 @@ if(NOT WIN32) endif(USE_GUI) endif(NOT WIN32) -target_link_libraries(nglib PRIVATE gen la gprim PUBLIC ngcore) +# target_link_libraries(nglib PRIVATE gen la gprim PUBLIC ngcore) +target_link_libraries(nglib PUBLIC ngcore) target_link_libraries( nglib PRIVATE ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ${OCC_LIBRARIES} )