From c13589789923d0c0f5f035cac18a9b9d82c8216c Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Wed, 23 Sep 2015 16:36:33 +0200 Subject: [PATCH] install nglib to bin, cmake fixes for windows --- CMakeLists.txt | 3 ++- ng/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f4230fb..20e2131e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,7 +104,7 @@ if(WIN32) set(CMAKE_MFC_FLAG 0) # add_definitions(-DNGINTERFACE_EXPORTS) # add_definitions(-DNGLIB_EXPORTS) - add_definitions(-DMSVC_EXPRESS -D_CRT_SECURE_NO_WARNINGS) + add_definitions(-DMSVC_EXPRESS -D_CRT_SECURE_NO_WARNINGS -DHAVE_STRUCT_TIMESPEC) # build convenience (aka object) libraries in windows) set(NG_LIB_TYPE OBJECT) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /wd4244 /wd4800") @@ -162,6 +162,7 @@ endif (USE_GUI) if (USE_PYTHON) set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${PROJECT_SOURCE_DIR}/cmake_modules/python") set(PYTHON_VERSION "3" CACHE STRING "") + set(Python_ADDITIONAL_VERSIONS 3.5) if( PYTHON_VERSION VERSION_LESS 3 ) message(FATAL_ERROR "NGSolve supports only Python 3") endif( PYTHON_VERSION VERSION_LESS 3 ) diff --git a/ng/CMakeLists.txt b/ng/CMakeLists.txt index 338d3589..d35b1648 100644 --- a/ng/CMakeLists.txt +++ b/ng/CMakeLists.txt @@ -44,7 +44,7 @@ if(USE_GUI) endif(USE_GUI) if(USE_PYTHON) - add_library(pynglib MODULE netgenpy.cpp) + add_library(pynglib SHARED netgenpy.cpp) target_link_libraries( pynglib nglib ) if(APPLE) set_target_properties( pynglib PROPERTIES SUFFIX ".so")