Pyodide fixes

This commit is contained in:
Matthias Hochsteger 2023-09-16 19:25:43 +02:00
parent f1ec19b35b
commit d069f57422
4 changed files with 8 additions and 22 deletions

View File

@ -394,16 +394,9 @@ if (USE_OCC)
TKXSBase
TKernel
)
foreach(LIB_NAME ${OCC_LIBRARIES})
set(LIB_VAR "LIB_${LIB_NAME}")
find_library(${LIB_VAR} ${LIB_NAME} NO_DEFAULT_PATH HINTS ${OpenCASCADE_LIBRARY_DIR})
target_link_libraries(occ_libs INTERFACE ${${LIB_VAR}})
endforeach()
target_link_libraries(occ_libs INTERFACE ${OCC_LIBRARIES})
include_directories(${OpenCASCADE_INCLUDE_DIR})
if(NOT OpenCASCADE_BUILD_SHARED_LIBS)
if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
target_link_libraries(occ_libs INTERFACE -Wl,--start-group)
endif()
if(OpenCASCADE_WITH_FREETYPE)
find_library( FREETYPE NAMES freetype HINTS ${OpenCASCADE_LIBRARY_DIR})
list(APPEND OCC_LIBRARIES ${FREETYPE})
@ -413,15 +406,9 @@ if (USE_OCC)
target_link_libraries(occ_libs INTERFACE ${Fontconfig_LIBRARIES})
endif()
endif(OpenCASCADE_WITH_FREETYPE)
if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(occ_libs INTERFACE Threads::Threads)
target_link_libraries(occ_libs INTERFACE -Wl,--end-group)
endif()
if(WIN32)
target_link_libraries(occ_libs INTERFACE Threads::Threads)
endif()
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(occ_libs INTERFACE Threads::Threads)
endif()
message(STATUS "OCC DIRS ${OpenCASCADE_INCLUDE_DIR}")
if(WIN32 AND USE_GUI)

View File

@ -235,7 +235,7 @@ namespace netgen
///
DLL_HEADER ~Mesh();
Mesh & operator= (const Mesh & mesh2);
DLL_HEADER Mesh & operator= (const Mesh & mesh2);
///
DLL_HEADER void DeleteMesh();

View File

@ -44,7 +44,7 @@ if(USE_PYTHON)
set_target_properties( ngpy PROPERTIES OUTPUT_NAME "libngpy")
endif()
set_target_properties(ngpy PROPERTIES INSTALL_RPATH "${NG_RPATH_TOKEN}/../${NETGEN_PYTHON_RPATH}")
install(TARGETS ngpy DESTINATION ${NG_INSTALL_DIR_PYTHON}/${NG_INSTALL_SUFFIX} COMPONENT netgen)
install(TARGETS ngpy DESTINATION ${NG_INSTALL_DIR_PYTHON}/${NG_INSTALL_SUFFIX} COMPONENT netgen EXPORT netgen-targets)
if(USE_GUI)
add_library(ngguipy SHARED ngguipy.cpp)
@ -56,7 +56,7 @@ if(USE_PYTHON)
set_target_properties( ngguipy PROPERTIES OUTPUT_NAME "libngguipy")
endif()
set_target_properties(ngguipy PROPERTIES INSTALL_RPATH "${NG_RPATH_TOKEN}/../${NETGEN_PYTHON_RPATH}")
install(TARGETS ngguipy DESTINATION ${NG_INSTALL_DIR_PYTHON}/${NG_INSTALL_SUFFIX} COMPONENT netgen)
install(TARGETS ngguipy DESTINATION ${NG_INSTALL_DIR_PYTHON}/${NG_INSTALL_SUFFIX} COMPONENT netgen EXPORT netgen-targets)
endif(USE_GUI)
endif(USE_PYTHON)

View File

@ -11,9 +11,8 @@ if(EMSCRIPTEN)
target_include_directories(nglib PUBLIC $<TARGET_PROPERTY:ngcore,INTERFACE_INCLUDE_DIRECTORIES>)
else(EMSCRIPTEN)
target_link_libraries(nglib PUBLIC ngcore)
target_link_libraries( nglib PRIVATE ${MPI_CXX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} occ_libs netgen_cgns )
endif(EMSCRIPTEN)
target_link_libraries( nglib PRIVATE ${MPI_CXX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} occ_libs netgen_cgns )
install(TARGETS nglib netgen_cgns ${NG_INSTALL_DIR})
install(FILES nglib.h DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel)