Fixed link ordering and detection of HL libraries
This commit is contained in:
parent
c7d0974857
commit
b2bf2cb042
@ -27,7 +27,10 @@ find_library(NETCDFCPP_LIBRARY NAMES netcdf_c++ netcdf_c++4)
|
||||
find_library(GSL_LIBRARY gsl)
|
||||
find_library(GSLCBLAS_LIBRARY gslcblas)
|
||||
|
||||
set(HDF5_FIND_COMPONENTS CXX)
|
||||
set(HDF5_FIND_COMPONENTS HL CXX)
|
||||
if(HDF5_ROOTDIR)
|
||||
SET(ENV{HDF5_ROOT} ${HDF5_ROOTDIR})
|
||||
endif(HDF5_ROOTDIR)
|
||||
include(FindHDF5)
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
SET(tolink ${GSL_LIBRARIES} CosmoTool ${CosmoTool_LIBS})
|
||||
SET(tolink CosmoTool ${CosmoTool_LIBS})
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src ${NETCDF_INCLUDE_PATH} ${GSL_INCLUDE_PATH})
|
||||
|
||||
add_executable(testBQueue testBQueue.cpp)
|
||||
|
@ -12,9 +12,12 @@ SET(CosmoTool_SRCS
|
||||
|
||||
IF(FOUND_NETCDF3)
|
||||
SET(CosmoTool_SRCS ${CosmoTool_SRCS} yorick_nc3.cpp)
|
||||
ELSEIF(FOUND_NETCDF4)
|
||||
ELSE(FOUND_NETCDF3)
|
||||
IF(FOUND_NETCDF4)
|
||||
SET(CosmoTool_SRCS ${CosmoTool_SRCS} yorick_nc4.cpp)
|
||||
ENDIF(FOUN_NETCDF3)
|
||||
ENDIF(FOUND_NETCDF4)
|
||||
ENDIF(FOUND_NETCDF3)
|
||||
|
||||
|
||||
if (HDF5_FOUND)
|
||||
set(CosmoTool_SRCS ${CosmoTool_SRCS}
|
||||
@ -53,13 +56,12 @@ SET(CosmoTool_SRCS ${CosmoTool_SRCS}
|
||||
|
||||
include_directories(${GSL_INCLUDE_PATH} ${NETCDF_INCLUDE_PATH} ${NETCDFCPP_INCLUDE_PATH} ${CMAKE_BINARY_DIR}/src)
|
||||
|
||||
set(CosmoTool_LIBS ${NETCDF_LIBRARY} ${NETCDFCPP_LIBRARY} ${GSL_LIBRARIES})
|
||||
set(CosmoTool_LIBS ${NETCDFCPP_LIBRARY} ${NETCDF_LIBRARY} ${GSL_LIBRARIES})
|
||||
if (HDF5_FOUND)
|
||||
set(CosmoTool_LIBS ${CosmoTool_LIBS} ${HDF5_CXX_LIBRARIES} ${HDF5_LIBRARIES})
|
||||
include_directories(${HDF5_INCLUDE_DIRS})
|
||||
endif (HDF5_FOUND)
|
||||
|
||||
message("${CosmoTool_LIBS}")
|
||||
set(CosmoTool_LIBS ${CosmoTool_LIBS} PARENT_SCOPE)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
|
Loading…
Reference in New Issue
Block a user