Commit 0d0ab154 authored by Chris Cantwell's avatar Chris Cantwell

Fixed ThirdPartyBoost to populate Nektar++Config.cmake.in

parent 5879cb68
......@@ -41,17 +41,17 @@ INCLUDE(GetGitRevisionDescription)
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
# Set library, binary, include, share and doc paths.
SET(LIB_DIR "lib/nektar++")
SET(LIB_DIR "lib/nektar++-${NEKTAR_VERSION}")
IF( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT APPLE )
SET(LIB_DIR "lib64/nektar++")
SET(LIB_DIR "lib64/nektar++-${NEKTAR_VERSION}")
ENDIF()
SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
SET(NEKTAR_BIN_DIR bin)
SET(NEKTAR_LIB_DIR ${LIB_DIR})
SET(NEKTAR_INCLUDE_DIR include/nektar++)
SET(NEKTAR_SHARE_DIR share/nektar++)
SET(NEKTAR_DOC_DIR share/doc/nektar++)
SET(NEKTAR_INCLUDE_DIR include/nektar++-${NEKTAR_VERSION})
SET(NEKTAR_SHARE_DIR share/nektar++-${NEKTAR_VERSION})
SET(NEKTAR_DOC_DIR share/doc/nektar++-${NEKTAR_VERSION})
# Build shared libraries.
SET(NEKTAR_LIBRARY_TYPE "SHARED")
......@@ -151,6 +151,7 @@ SET(TPSRC ${CMAKE_SOURCE_DIR}/ThirdParty)
SET(TPBUILD ${CMAKE_BINARY_DIR}/ThirdParty)
SET(TPDIST ${CMAKE_BINARY_DIR}/ThirdParty/dist)
SET(TPINC ${CMAKE_INSTALL_PREFIX}/include/ThirdParty)
SET(TPLIB ${CMAKE_INSTALL_PREFIX}/${NEKTAR_LIB_DIR})
# Create ThirdParty source directory if it doesn't exist already.
IF (NOT EXISTS ${TPSRC})
......@@ -263,7 +264,7 @@ IF (NEKTAR_BUILD_LIBRARY)
MultiRegions)
INCLUDE_DIRECTORIES(library)
ADD_SUBDIRECTORY(library)
INSTALL(EXPORT Nektar++Libraries DESTINATION ${LIB_DIR})
INSTALL(EXPORT Nektar++Libraries DESTINATION ${LIB_DIR}/cmake)
ENDIF (NEKTAR_BUILD_LIBRARY)
IF (NEKTAR_BUILD_SOLVERS)
......
......@@ -40,10 +40,11 @@ SET(NEKTAR++_TP_LIBRARIES "")
SET(NEKTAR++_TP_LIBRARY_DIRS "")
# Set up Boost and other ThirdParty include directories.
SET(Boost_INCLUDE_DIRS "@Boost_INCLUDE_DIRS@")
SET(Boost_LIBRARIES "@Boost_LIBRARIES@")
SET(Boost_LIBRARY_DIRS "@Boost_LIBRARY_DIRS@")
SET(Boost_INCLUDE_DIRS "@Boost_CONFIG_INCLUDE_DIR@")
SET(NEKTAR++_TP_INCLUDE_DIRS ${NEKTAR++_TP_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
SET(Boost_LIBRARIES @Boost_LIBRARIES@)
SET(Boost_LIBRARY_DIRS "@Boost_CONFIG_LIBRARY_DIR@")
SET(NEKTAR++_TP_LIBRARIES ${NEKTAR++_TP_LIBRARIES} ${Boost_LIBRARIES})
SET(NEKTAR_USE_MPI "@NEKTAR_USE_MPI@")
......
......@@ -136,7 +136,10 @@ IF (THIRDPARTY_BUILD_BOOST)
SET(Boost_THREAD_LIBRARY_DEBUG boost_thread)
SET(Boost_THREAD_LIBRARY_RELEASE boost_thread)
SET(Boost_INCLUDE_DIRS ${TPSRC}/dist/include)
SET(Boost_CONFIG_INCLUDE_DIR ${TPINC})
SET(Boost_LIBRARY_DIRS ${TPSRC}/dist/lib)
SET(Boost_CONFIG_LIBRARY_DIR ${TPLIB})
SET(Boost_LIBRARIES boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_system boost_thread)
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
ELSE (THIRDPARTY_BUILD_BOOST)
ADD_CUSTOM_TARGET(boost ALL)
......@@ -185,6 +188,8 @@ ELSE (THIRDPARTY_BUILD_BOOST)
IF (BOOST_THREAD_LIBRARY)
MARK_AS_ADVANCED(BOOST_THREAD_LIBRARY)
ENDIF (BOOST_THREAD_LIBRARY)
SET(Boost_CONFIG_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
SET(Boost_CONFIG_LIBRARY_DIR ${Boost_LIBRARY_DIRS})
ENDIF (THIRDPARTY_BUILD_BOOST)
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment