[cmake] Don't install object libraries on Windows

Works around following issue with CMake 3.14:
> CMake error : install(EXPORT "netgen-targets" ...) includes target "mesh" which requires target "gprim" that is not in the export set.
This commit is contained in:
Matthias Hochsteger 2019-04-16 12:39:56 -07:00
parent 18feeba999
commit d6f1cf2bda
4 changed files with 12 additions and 4 deletions

View File

@ -12,7 +12,9 @@ if(APPLE)
endif(APPLE)
target_link_libraries(csg PUBLIC mesh ${PYTHON_LIBRARIES})
install( TARGETS csg ${NG_INSTALL_DIR})
if(NOT WIN32)
install( TARGETS csg ${NG_INSTALL_DIR})
endif(NOT WIN32)
target_link_libraries(csg PUBLIC ngcore)

View File

@ -5,7 +5,9 @@ if(APPLE)
endif(APPLE)
target_link_libraries(geom2d mesh ${PYTHON_LIBRARIES})
install( TARGETS geom2d ${NG_INSTALL_DIR})
if(NOT WIN32)
install( TARGETS geom2d ${NG_INSTALL_DIR})
endif(NOT WIN32)
target_link_libraries(geom2d ngcore)

View File

@ -9,7 +9,9 @@ add_library(interface ${NG_LIB_TYPE}
target_link_libraries(interface mesh csg geom2d)
target_link_libraries(interface visual)
install( TARGETS interface ${NG_INSTALL_DIR})
if(NOT WIN32)
install( TARGETS interface ${NG_INSTALL_DIR})
endif(NOT WIN32)
install(FILES
writeuser.hpp

View File

@ -24,7 +24,9 @@ endif(APPLE)
target_link_libraries( mesh PUBLIC ngcore PRIVATE gprim la gen )
target_link_libraries( mesh PUBLIC ${ZLIB_LIBRARIES} ${MPI_CXX_LIBRARIES} ${PYTHON_LIBRARIES} ${METIS_LIBRARY})
install( TARGETS mesh ${NG_INSTALL_DIR})
if(NOT WIN32)
install( TARGETS mesh ${NG_INSTALL_DIR})
endif(NOT WIN32)
install(FILES
adfront2.hpp adfront3.hpp basegeom.hpp bcfunctions.hpp bisect.hpp