Fix build errors on Windows

This commit is contained in:
Matthias Hochsteger 2019-01-08 13:12:12 +01:00
parent 460ee696fd
commit 4a563f09af
8 changed files with 17 additions and 9 deletions

View File

@ -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)

View File

@ -943,7 +943,7 @@ namespace ngcore
};
template<typename T, typename T_ARCHIVE_OUT=BinaryOutArchive, typename T_ARCHIVE_IN=BinaryInArchive>
NGCORE_API auto NGSPickle()
auto NGSPickle()
{
return pybind11::pickle([](T* self)
{

View File

@ -19,7 +19,7 @@ namespace ngcore
Complexity by name access is linear, by index is constant.
*/
template <class T>
class NGCORE_API SymbolTable
class SymbolTable
{
std::vector<std::string> names;
std::vector<T> data;

View File

@ -16,6 +16,7 @@ namespace ngcore
nullptr,
nullptr,
&status); }
#endif
double ticks_per_second = [] () noexcept
{
@ -36,5 +37,3 @@ namespace ngcore
} // namespace ngcore
#endif

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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} )