[cmake] Link ngcore to other libraries

This commit is contained in:
Matthias Hochsteger 2019-01-08 11:30:11 +01:00
parent 247b2a2892
commit 460ee696fd
2 changed files with 9 additions and 3 deletions

View File

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

View File

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