mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
Fix build errors on Windows
This commit is contained in:
parent
460ee696fd
commit
4a563f09af
@ -29,6 +29,7 @@ install(TARGETS ngcore DESTINATION ${NG_INSTALL_DIR} COMPONENT netgen)
|
|||||||
if(USE_PYTHON)
|
if(USE_PYTHON)
|
||||||
target_compile_definitions(ngcore PUBLIC NETGEN_PYTHON)
|
target_compile_definitions(ngcore PUBLIC NETGEN_PYTHON)
|
||||||
target_include_directories(ngcore PUBLIC ${PYTHON_INCLUDE_DIRS})
|
target_include_directories(ngcore PUBLIC ${PYTHON_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(ngcore PUBLIC ${PYTHON_LIBRARIES})
|
||||||
endif(USE_PYTHON)
|
endif(USE_PYTHON)
|
||||||
|
|
||||||
install(FILES ngcore.hpp archive.hpp type_traits.hpp version.hpp ngcore_api.hpp logging.hpp
|
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)
|
if(USE_PYTHON)
|
||||||
pybind11_add_module(pyngcore SHARED python_ngcore.cpp)
|
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}")
|
set_target_properties(pyngcore PROPERTIES INSTALL_RPATH "${NG_RPATH_TOKEN}/${NETGEN_PYTHON_RPATH}")
|
||||||
install(TARGETS pyngcore DESTINATION ${NG_INSTALL_DIR_PYTHON} COMPONENT netgen)
|
install(TARGETS pyngcore DESTINATION ${NG_INSTALL_DIR_PYTHON} COMPONENT netgen)
|
||||||
endif(USE_PYTHON)
|
endif(USE_PYTHON)
|
||||||
|
@ -943,7 +943,7 @@ namespace ngcore
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename T_ARCHIVE_OUT=BinaryOutArchive, typename T_ARCHIVE_IN=BinaryInArchive>
|
template<typename T, typename T_ARCHIVE_OUT=BinaryOutArchive, typename T_ARCHIVE_IN=BinaryInArchive>
|
||||||
NGCORE_API auto NGSPickle()
|
auto NGSPickle()
|
||||||
{
|
{
|
||||||
return pybind11::pickle([](T* self)
|
return pybind11::pickle([](T* self)
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,7 @@ namespace ngcore
|
|||||||
Complexity by name access is linear, by index is constant.
|
Complexity by name access is linear, by index is constant.
|
||||||
*/
|
*/
|
||||||
template <class T>
|
template <class T>
|
||||||
class NGCORE_API SymbolTable
|
class SymbolTable
|
||||||
{
|
{
|
||||||
std::vector<std::string> names;
|
std::vector<std::string> names;
|
||||||
std::vector<T> data;
|
std::vector<T> data;
|
||||||
|
@ -16,6 +16,7 @@ namespace ngcore
|
|||||||
nullptr,
|
nullptr,
|
||||||
nullptr,
|
nullptr,
|
||||||
&status); }
|
&status); }
|
||||||
|
#endif
|
||||||
|
|
||||||
double ticks_per_second = [] () noexcept
|
double ticks_per_second = [] () noexcept
|
||||||
{
|
{
|
||||||
@ -36,5 +37,3 @@ namespace ngcore
|
|||||||
|
|
||||||
} // namespace ngcore
|
} // namespace ngcore
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@ if(NOT WIN32)
|
|||||||
install( TARGETS geom2d ${NG_INSTALL_DIR})
|
install( TARGETS geom2d ${NG_INSTALL_DIR})
|
||||||
endif(NOT WIN32)
|
endif(NOT WIN32)
|
||||||
|
|
||||||
|
target_link_libraries(geom2d ngcore)
|
||||||
|
|
||||||
if(USE_GUI)
|
if(USE_GUI)
|
||||||
add_library(geom2dvis ${NG_LIB_TYPE} vsgeom2d.cpp)
|
add_library(geom2dvis ${NG_LIB_TYPE} vsgeom2d.cpp)
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
|
@ -8,11 +8,13 @@ if(USE_GUI)
|
|||||||
add_library(occvis ${NG_LIB_TYPE} vsocc.cpp)
|
add_library(occvis ${NG_LIB_TYPE} vsocc.cpp)
|
||||||
endif(USE_GUI)
|
endif(USE_GUI)
|
||||||
|
|
||||||
|
target_link_libraries(occ PUBLIC ngcore)
|
||||||
|
|
||||||
if(NOT WIN32)
|
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})
|
install( TARGETS occ ${NG_INSTALL_DIR})
|
||||||
if (USE_GUI)
|
if (USE_GUI)
|
||||||
target_link_libraries( occvis occ )
|
target_link_libraries( occvis PUBLIC occ )
|
||||||
install( TARGETS occvis ${NG_INSTALL_DIR})
|
install( TARGETS occvis ${NG_INSTALL_DIR})
|
||||||
endif(USE_GUI)
|
endif(USE_GUI)
|
||||||
endif(NOT WIN32)
|
endif(NOT WIN32)
|
||||||
|
@ -4,10 +4,13 @@ add_library(stl ${NG_LIB_TYPE}
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
target_link_libraries( stl ngcore mesh ${PYTHON_LIBRARIES})
|
target_link_libraries( stl mesh ${PYTHON_LIBRARIES})
|
||||||
install( TARGETS stl ${NG_INSTALL_DIR})
|
install( TARGETS stl ${NG_INSTALL_DIR})
|
||||||
endif(NOT WIN32)
|
endif(NOT WIN32)
|
||||||
|
|
||||||
|
target_link_libraries( stl ngcore )
|
||||||
|
|
||||||
|
|
||||||
if(USE_GUI)
|
if(USE_GUI)
|
||||||
add_library(stlvis ${NG_LIB_TYPE}
|
add_library(stlvis ${NG_LIB_TYPE}
|
||||||
vsstl.cpp
|
vsstl.cpp
|
||||||
|
@ -29,7 +29,8 @@ if(NOT WIN32)
|
|||||||
endif(USE_GUI)
|
endif(USE_GUI)
|
||||||
endif(NOT WIN32)
|
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} )
|
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} )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user