install boost lib and headers in windows

This commit is contained in:
Matthias 2016-01-07 11:31:10 +01:00
parent f06dd6fe25
commit b3451ed2e4

View File

@ -190,20 +190,25 @@ if (USE_PYTHON)
find_package(PythonLibs ${PYTHON_VERSION} EXACT REQUIRED)
endif( PYTHON_VERSION STREQUAL "3")
set(Boost_FIND_QUIETLY ON)
if(NOT Boost_LIBRARIES)
find_package(Boost COMPONENTS python${PYTHON_VERSION_MAJOR})
endif(NOT Boost_LIBRARIES)
if(NOT Boost_LIBRARIES)
find_package(Boost COMPONENTS python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
endif(NOT Boost_LIBRARIES)
if(NOT Boost_LIBRARIES)
find_package(Boost COMPONENTS python)
endif(NOT Boost_LIBRARIES)
foreach( component IN ITEMS PYTHON${PYTHON_VERSION_MAJOR} PYTHON-PY${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} PYTHON)
if(NOT Boost_LIBRARIES)
find_package(Boost COMPONENTS ${component})
set(BOOST_PYTHON_LIB ${Boost_${component}_LIBRARY_RELEASE})
endif(NOT Boost_LIBRARIES)
endforeach()
if(NOT Boost_LIBRARIES)
message(FATAL_ERROR "Could NOT find Boost-Python" )
else(NOT Boost_LIBRARIES)
message("-- Found Boost_python: ${BOOST_PYTHON_LIB}")
endif(NOT Boost_LIBRARIES)
add_definitions(-DNG_PYTHON)
if(WIN32)
install(FILES ${BOOST_PYTHON_LIB} DESTINATION lib COMPONENT netgen)
install(DIRECTORY ${Boost_INCLUDE_DIR}/boost DESTINATION include COMPONENT netgen)
endif(WIN32)
if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
# fix problems with boosts config/auto_link.hpp