install nglib to bin, cmake fixes for windows

This commit is contained in:
Matthias Hochsteger 2015-09-23 16:36:33 +02:00
parent 105111f5c9
commit c135897899
2 changed files with 3 additions and 2 deletions

View File

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

View File

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