mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-27 08:49:16 +08:00
d3b309722e
I took Ed's advice and moved the plugin stuff to its own top-level directory. This is an attempt to solve the problem of copying files that we have experienced. In any case, it will serve as a place to stick additional plugins.
41 lines
1.6 KiB
CMake
41 lines
1.6 KiB
CMake
SET(CMAKE_BUILD_TYPE "")
|
|
|
|
SET(libbzip2_SOURCES blocksort.c huffman.c crctable.c randtable.c compress.c decompress.c bzlib.c H5Zbzip2.c)
|
|
|
|
SET(libmisc_SOURCES H5Zmisc.c)
|
|
|
|
IF(ENABLE_FILTER_TESTING)
|
|
IF(BUILD_UTILITIES)
|
|
|
|
# LDFLAGS = -module -avoid-version -shared -export-dynamic -no-undefined
|
|
|
|
IF(MSVC)
|
|
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
|
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}")
|
|
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}")
|
|
ENDIF()
|
|
|
|
# Note we use name test_bzip2 instead of bzip2 to avoid logical
|
|
# target name clash with examples/C/hdf5plugins
|
|
ADD_LIBRARY(test_bzip2 MODULE ${libbzip2_SOURCES})
|
|
SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES OUTPUT_NAME "bzip2")
|
|
SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES LIBRARY_OUTPUT_NAME "bzip2")
|
|
SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES ARCHIVE_OUTPUT_NAME "bzip2")
|
|
SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES RUNTIME_OUTPUT_NAME "bzip2")
|
|
TARGET_LINK_LIBRARIES(test_bzip2 ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES})
|
|
|
|
ADD_LIBRARY(misc MODULE ${libmisc_SOURCES})
|
|
SET_TARGET_PROPERTIES(misc PROPERTIES LIBRARY_OUTPUT_NAME "misc")
|
|
SET_TARGET_PROPERTIES(misc PROPERTIES ARCHIVE_OUTPUT_NAME "misc")
|
|
SET_TARGET_PROPERTIES(misc PROPERTIES RUNTIME_OUTPUT_NAME "misc")
|
|
TARGET_LINK_LIBRARIES(misc ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES})
|
|
|
|
ENDIF(BUILD_UTILITIES)
|
|
ENDIF(ENABLE_FILTER_TESTING)
|
|
|
|
# Copy some test files from current source dir to out-of-tree build dir.
|
|
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
|
|
IF(MSVC)
|
|
FILE(COPY ${COPY_FILES} DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}/)
|
|
ENDIF()
|