From 460ee696fdf82b1c94d0c0fc91b0f259efd5bfd9 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Tue, 8 Jan 2019 11:30:11 +0100 Subject: [PATCH] [cmake] Link ngcore to other libraries --- CMakeLists.txt | 8 +++++++- libsrc/csg/CMakeLists.txt | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 29a73670..cf153b4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,13 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING INTERNAL) endif(NOT CMAKE_BUILD_TYPE) -cmake_minimum_required(VERSION 3.1.3) +if(WIN32) + # we are linking to object libraries on Windows + cmake_minimum_required(VERSION 3.12) +else(WIN32) + cmake_minimum_required(VERSION 3.1.3) +endif(WIN32) + if(NOT WIN32) option( USE_NATIVE_ARCH "build which -march=native" ON) endif(NOT WIN32) diff --git a/libsrc/csg/CMakeLists.txt b/libsrc/csg/CMakeLists.txt index 224a48e4..d05d62c1 100644 --- a/libsrc/csg/CMakeLists.txt +++ b/libsrc/csg/CMakeLists.txt @@ -12,11 +12,11 @@ if(APPLE) endif(APPLE) if(NOT WIN32) - target_link_libraries(csg mesh ${PYTHON_LIBRARIES}) - target_link_libraries(csg ${PYTHON_LIBRARIES}) + target_link_libraries(csg PUBLIC mesh ${PYTHON_LIBRARIES}) install( TARGETS csg ${NG_INSTALL_DIR}) endif(NOT WIN32) +target_link_libraries(csg PUBLIC ngcore) if(USE_GUI) add_library(csgvis ${NG_LIB_TYPE} vscsg.cpp )