mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
Pyodide fixes
This commit is contained in:
parent
f1ec19b35b
commit
d069f57422
@ -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()
|
||||
endif()
|
||||
message(STATUS "OCC DIRS ${OpenCASCADE_INCLUDE_DIR}")
|
||||
if(WIN32 AND USE_GUI)
|
||||
|
@ -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();
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user