CMakelists.txt for compiling HDF5

使用cmake编译包含hdf5的c++程序


cmake_minimum_required(VERSION 3.0) 

PROJECT (engine)

find_package(HDF5 REQUIRED COMPONENTS C CXX)


include_directories(${HDF5_INCLUDE_DIRS})

add_executable( engine writedata.cpp )

target_link_libraries( engine ${HDF5_CXX_LIBRARIES} ${HDF5_LIBRARIES})

install(TARGETS engine DESTINATION bin)

你可能感兴趣的:(CMakelists.txt for compiling HDF5)