From d6f1cf2bda17826677b54562db7fe27265230a8d Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Tue, 16 Apr 2019 12:39:56 -0700 Subject: [PATCH] [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. --- libsrc/csg/CMakeLists.txt | 4 +++- libsrc/geom2d/CMakeLists.txt | 4 +++- libsrc/interface/CMakeLists.txt | 4 +++- libsrc/meshing/CMakeLists.txt | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/libsrc/csg/CMakeLists.txt b/libsrc/csg/CMakeLists.txt index eaf7dffc..98475096 100644 --- a/libsrc/csg/CMakeLists.txt +++ b/libsrc/csg/CMakeLists.txt @@ -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) diff --git a/libsrc/geom2d/CMakeLists.txt b/libsrc/geom2d/CMakeLists.txt index 43c619a0..395141e5 100644 --- a/libsrc/geom2d/CMakeLists.txt +++ b/libsrc/geom2d/CMakeLists.txt @@ -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) diff --git a/libsrc/interface/CMakeLists.txt b/libsrc/interface/CMakeLists.txt index afd301d9..d27061b1 100644 --- a/libsrc/interface/CMakeLists.txt +++ b/libsrc/interface/CMakeLists.txt @@ -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 diff --git a/libsrc/meshing/CMakeLists.txt b/libsrc/meshing/CMakeLists.txt index 12fe70ae..f1e9ee86 100644 --- a/libsrc/meshing/CMakeLists.txt +++ b/libsrc/meshing/CMakeLists.txt @@ -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