From 3902456b3b8a902cdcf2fa491aa18612aa2e4c94 Mon Sep 17 00:00:00 2001 From: lorenz Date: Tue, 27 Nov 2018 16:23:47 +0100 Subject: [PATCH 1/3] build without gui shouldn't add visualization for occ --- libsrc/occ/CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libsrc/occ/CMakeLists.txt b/libsrc/occ/CMakeLists.txt index 2f10e54e..c9d6b880 100644 --- a/libsrc/occ/CMakeLists.txt +++ b/libsrc/occ/CMakeLists.txt @@ -4,13 +4,16 @@ add_library(occ ${NG_LIB_TYPE} Partition_Loop.cxx Partition_Loop2d.cxx Partition_Loop3d.cxx Partition_Spliter.cxx occconstruction.cpp occgenmesh.cpp occgeom.cpp occmeshsurf.cpp python_occ.cpp ) - -add_library(occvis ${NG_LIB_TYPE} vsocc.cpp) +if(USE_GUI) + add_library(occvis ${NG_LIB_TYPE} vsocc.cpp) +endif(USE_GUI) if(NOT WIN32) target_link_libraries( occ ${OCC_LIBRARIES} ${PYTHON_LIBRARIES}) - target_link_libraries( occvis occ ) - install( TARGETS occ occvis ${NG_INSTALL_DIR}) + if (USE_GUI) + target_link_libraries( occvis occ ) + install( TARGETS occ occvis ${NG_INSTALL_DIR}) + endif(USE_GUI) endif(NOT WIN32) install(FILES From 143218245880f62a0489905c2f38714159089683 Mon Sep 17 00:00:00 2001 From: lorenz Date: Tue, 27 Nov 2018 16:29:07 +0100 Subject: [PATCH 2/3] occ must be installed --- libsrc/occ/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libsrc/occ/CMakeLists.txt b/libsrc/occ/CMakeLists.txt index c9d6b880..831a3875 100644 --- a/libsrc/occ/CMakeLists.txt +++ b/libsrc/occ/CMakeLists.txt @@ -10,9 +10,10 @@ endif(USE_GUI) if(NOT WIN32) target_link_libraries( occ ${OCC_LIBRARIES} ${PYTHON_LIBRARIES}) + install( TARGETS occ ${NG_INSTALL_DIR}) if (USE_GUI) target_link_libraries( occvis occ ) - install( TARGETS occ occvis ${NG_INSTALL_DIR}) + install( TARGETS occvis ${NG_INSTALL_DIR}) endif(USE_GUI) endif(NOT WIN32) From 593ce091b7234684561ae9e20c12440cd2cb7c30 Mon Sep 17 00:00:00 2001 From: lorenz Date: Thu, 29 Nov 2018 15:51:20 +0100 Subject: [PATCH 3/3] link to visual also if USE_GUI=OFF --- libsrc/interface/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libsrc/interface/CMakeLists.txt b/libsrc/interface/CMakeLists.txt index ef52c30b..cb460fae 100644 --- a/libsrc/interface/CMakeLists.txt +++ b/libsrc/interface/CMakeLists.txt @@ -9,9 +9,7 @@ add_library(interface ${NG_LIB_TYPE} if(NOT WIN32) target_link_libraries(interface mesh csg geom2d) - if(USE_GUI) - target_link_libraries(interface visual) - endif(USE_GUI) + target_link_libraries(interface visual) install( TARGETS interface ${NG_INSTALL_DIR}) endif(NOT WIN32)