Skip to content

Commit d03300f

Browse files
First attempt to solve this problem
Update #194
1 parent 1977b15 commit d03300f

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

doc/design/cpp.profile.di

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
2+
<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.uml.architecture.Profile"/>

src/h5cpp/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ set(H5CPP_LINKS Boost::filesystem ${MPI_CXX_LIBRARIES})
2929
#
3030
# remove the absolute path from the library name
3131
#
32+
set(H5CPP_INTERFACE_LIBS)
33+
set(H5CPP_PRIVATE_LIBS ${HDF5_LIBRARIES})
3234
foreach(HDF5_LIBRARY ${HDF5_LIBRARIES})
3335
get_filename_component(LIB_NAME ${HDF5_LIBRARY} NAME)
34-
get_filename_component(LIB_PATH ${HDF5_LIBRARY} DIRECTORY)
35-
list(APPEND H5CPP_LINKS ${LIB_NAME})
36+
list(APPEND H5CPP_INTERFACE_LIBS ${LIB_NAME})
3637
endforeach()
3738

3839

@@ -62,7 +63,8 @@ enable_coverage(h5cpp_shared)
6263

6364
target_link_libraries(h5cpp_shared
6465
PUBLIC ${H5CPP_LINKS}
65-
PRIVATE ${COVERAGE_LIBRARIES})
66+
PRIVATE ${COVERAGE_LIBRARIES} ${H5CPP_PRIVATE_LIBS}
67+
INTERFACE ${H5CPP_INTERFACE_LIBS})
6668

6769
include(GNUInstallDirs) #Required for CMAKE_INSTALL_XXX
6870

test/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
55
add_definitions(/wd4251 /wd4275)
66
endif ()
77

8-
include_directories(${PROJECT_SOURCE_DIR}/src)
8+
include_directories(${PROJECT_SOURCE_DIR}/src ${HDF5_INCLUDE_DIRS})
9+
foreach(HDF5_LIB ${HDF5_LIBRARIES})
10+
get_filename_component(LIB_PATH ${HDF5_LIB} DIRECTORY)
11+
link_directories(${LIB_PATH})
12+
endforeach()
13+
914

1015
set(dir ${CMAKE_CURRENT_SOURCE_DIR})
1116

0 commit comments

Comments
 (0)