diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 276 |
1 files changed, 143 insertions, 133 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c626065..db26166 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,12 +4,12 @@ PROJECT (HDF5_SRC C CXX) #----------------------------------------------------------------------------- # Apply Definitions to compiler in this directory and below #----------------------------------------------------------------------------- -ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS}) +add_definitions (${HDF5_EXTRA_C_FLAGS}) #----------------------------------------------------------------------------- # List Source Files #----------------------------------------------------------------------------- -SET (H5_SRCS +set (H5_SRCS ${HDF5_SRC_DIR}/H5.c ${HDF5_SRC_DIR}/H5checksum.c ${HDF5_SRC_DIR}/H5dbg.c @@ -18,7 +18,7 @@ SET (H5_SRCS ${HDF5_SRC_DIR}/H5trace.c ) -SET (H5_HDRS +set (H5_HDRS ${HDF5_SRC_DIR}/hdf5.h ${HDF5_SRC_DIR}/H5api_adpt.h ${HDF5_SRC_DIR}/H5public.h @@ -27,7 +27,7 @@ SET (H5_HDRS ) IDE_GENERATED_PROPERTIES ("H5" "${H5_HDRS}" "${H5_SRCS}" ) -SET (H5A_SRCS +set (H5A_SRCS ${HDF5_SRC_DIR}/H5A.c ${HDF5_SRC_DIR}/H5Abtree2.c ${HDF5_SRC_DIR}/H5Adense.c @@ -36,35 +36,35 @@ SET (H5A_SRCS ${HDF5_SRC_DIR}/H5Atest.c ) -SET (H5A_HDRS +set (H5A_HDRS ${HDF5_SRC_DIR}/H5Apkg.h ${HDF5_SRC_DIR}/H5Apublic.h ) IDE_GENERATED_PROPERTIES ("H5A" "${H5A_HDRS}" "${H5A_SRCS}" ) -SET (H5AC_SRCS +set (H5AC_SRCS ${HDF5_SRC_DIR}/H5AC.c ) -SET (H5AC_HDRS +set (H5AC_HDRS ${HDF5_SRC_DIR}/H5ACpkg.h ${HDF5_SRC_DIR}/H5ACpublic.h ) IDE_GENERATED_PROPERTIES ("H5AC" "${H5AC_HDRS}" "${H5AC_SRCS}" ) -SET (H5B_SRCS +set (H5B_SRCS ${HDF5_SRC_DIR}/H5B.c ${HDF5_SRC_DIR}/H5Bcache.c ${HDF5_SRC_DIR}/H5Bdbg.c ) -SET (H5B_HDRS +set (H5B_HDRS ${HDF5_SRC_DIR}/H5Bpkg.h ${HDF5_SRC_DIR}/H5Bpublic.h ) IDE_GENERATED_PROPERTIES ("H5B" "${H5B_HDRS}" "${H5B_SRCS}" ) -SET (H5B2_SRCS +set (H5B2_SRCS ${HDF5_SRC_DIR}/H5B2.c ${HDF5_SRC_DIR}/H5B2cache.c ${HDF5_SRC_DIR}/H5B2dbg.c @@ -73,32 +73,32 @@ SET (H5B2_SRCS ${HDF5_SRC_DIR}/H5B2stat.c ${HDF5_SRC_DIR}/H5B2test.c ) -SET (H5B2_HDRS +set (H5B2_HDRS ${HDF5_SRC_DIR}/H5B2pkg.h ${HDF5_SRC_DIR}/H5B2public.h ) IDE_GENERATED_PROPERTIES ("H5B2" "${H5B2_HDRS}" "${H5B2_SRCS}" ) -SET (H5C_SRCS +set (H5C_SRCS ${HDF5_SRC_DIR}/H5C.c ) -SET (H5C_HDRS +set (H5C_HDRS ${HDF5_SRC_DIR}/H5Cpkg.h ${HDF5_SRC_DIR}/H5Cpublic.h ) IDE_GENERATED_PROPERTIES ("H5C" "${H5C_HDRS}" "${H5C_SRCS}" ) -SET (H5CS_SRCS +set (H5CS_SRCS ${HDF5_SRC_DIR}/H5CS.c ) -SET (H5CS_HDRS +set (H5CS_HDRS ) IDE_GENERATED_PROPERTIES ("H5CS" "${H5CS_HDRS}" "${H5CS_SRCS}" ) -SET (H5D_SRCS +set (H5D_SRCS ${HDF5_SRC_DIR}/H5D.c ${HDF5_SRC_DIR}/H5Dbtree.c ${HDF5_SRC_DIR}/H5Dchunk.c @@ -118,19 +118,19 @@ SET (H5D_SRCS ${HDF5_SRC_DIR}/H5Dtest.c ) -SET (H5D_HDRS +set (H5D_HDRS ${HDF5_SRC_DIR}/H5Dpkg.h ${HDF5_SRC_DIR}/H5Dpublic.h ) IDE_GENERATED_PROPERTIES ("H5D" "${H5D_HDRS}" "${H5D_SRCS}" ) -SET (H5E_SRCS +set (H5E_SRCS ${HDF5_SRC_DIR}/H5E.c ${HDF5_SRC_DIR}/H5Edeprec.c ${HDF5_SRC_DIR}/H5Eint.c ) -SET (H5E_HDRS +set (H5E_HDRS ${HDF5_SRC_DIR}/H5Edefin.h ${HDF5_SRC_DIR}/H5Einit.h ${HDF5_SRC_DIR}/H5Epkg.h @@ -141,7 +141,7 @@ SET (H5E_HDRS IDE_GENERATED_PROPERTIES ("H5E" "${H5E_HDRS}" "${H5E_SRCS}" ) -SET (H5EA_SRCS +set (H5EA_SRCS ${HDF5_SRC_DIR}/H5EA.c ${HDF5_SRC_DIR}/H5EAcache.c ${HDF5_SRC_DIR}/H5EAdbg.c @@ -154,13 +154,13 @@ SET (H5EA_SRCS ${HDF5_SRC_DIR}/H5EAstat.c ${HDF5_SRC_DIR}/H5EAtest.c ) -SET (H5EA_HDRS +set (H5EA_HDRS ${HDF5_SRC_DIR}/H5EApkg.h ) IDE_GENERATED_PROPERTIES ("H5EA" "${H5EA_HDRS}" "${H5EA_SRCS}" ) -SET (H5F_SRCS +set (H5F_SRCS ${HDF5_SRC_DIR}/H5F.c ${HDF5_SRC_DIR}/H5Faccum.c ${HDF5_SRC_DIR}/H5Fcwfs.c @@ -178,14 +178,14 @@ SET (H5F_SRCS ${HDF5_SRC_DIR}/H5Ftest.c ) -SET (H5F_HDRS +set (H5F_HDRS ${HDF5_SRC_DIR}/H5Fpkg.h ${HDF5_SRC_DIR}/H5Fpublic.h ) IDE_GENERATED_PROPERTIES ("H5F" "${H5F_HDRS}" "${H5F_SRCS}" ) -SET (H5FA_SRCS +set (H5FA_SRCS ${HDF5_SRC_DIR}/H5FA.c ${HDF5_SRC_DIR}/H5FAcache.c ${HDF5_SRC_DIR}/H5FAdbg.c @@ -195,13 +195,13 @@ SET (H5FA_SRCS ${HDF5_SRC_DIR}/H5FAstat.c ${HDF5_SRC_DIR}/H5FAtest.c ) -SET (H5FA_HDRS +set (H5FA_HDRS ${HDF5_SRC_DIR}/H5FApkg.h ) IDE_GENERATED_PROPERTIES ("H5FA" "${H5FA_HDRS}" "${H5FA_SRCS}" ) -SET (H5FD_SRCS +set (H5FD_SRCS ${HDF5_SRC_DIR}/H5FD.c ${HDF5_SRC_DIR}/H5FDcore.c ${HDF5_SRC_DIR}/H5FDdirect.c @@ -218,7 +218,7 @@ SET (H5FD_SRCS ${HDF5_SRC_DIR}/H5FDwindows.c ) -SET (H5FD_HDRS +set (H5FD_HDRS ${HDF5_SRC_DIR}/H5FDcore.h ${HDF5_SRC_DIR}/H5FDdirect.h ${HDF5_SRC_DIR}/H5FDfamily.h @@ -236,23 +236,23 @@ SET (H5FD_HDRS IDE_GENERATED_PROPERTIES ("H5FD" "${H5FD_HDRS}" "${H5FD_SRCS}" ) -SET (H5FL_SRCS +set (H5FL_SRCS ${HDF5_SRC_DIR}/H5FL.c ) -SET (H5FL_HDRS +set (H5FL_HDRS ) IDE_GENERATED_PROPERTIES ("H5FL" "${H5FL_HDRS}" "${H5FL_SRCS}" ) -SET (H5FO_SRCS +set (H5FO_SRCS ${HDF5_SRC_DIR}/H5FO.c ) -SET (H5FO_HDRS +set (H5FO_HDRS ) IDE_GENERATED_PROPERTIES ("H5FO" "${H5FO_HDRS}" "${H5FO_SRCS}" ) -SET (H5FS_SRCS +set (H5FS_SRCS ${HDF5_SRC_DIR}/H5FS.c ${HDF5_SRC_DIR}/H5FScache.c ${HDF5_SRC_DIR}/H5FSdbg.c @@ -261,13 +261,13 @@ SET (H5FS_SRCS ${HDF5_SRC_DIR}/H5FStest.c ) -SET (H5FS_HDRS +set (H5FS_HDRS ${HDF5_SRC_DIR}/H5FSpkg.h ${HDF5_SRC_DIR}/H5FSpublic.h ) IDE_GENERATED_PROPERTIES ("H5FS" "${H5FS_HDRS}" "${H5FS_SRCS}" ) -SET (H5G_SRCS +set (H5G_SRCS ${HDF5_SRC_DIR}/H5G.c ${HDF5_SRC_DIR}/H5Gbtree2.c ${HDF5_SRC_DIR}/H5Gcache.c @@ -288,13 +288,13 @@ SET (H5G_SRCS ${HDF5_SRC_DIR}/H5Gtraverse.c ) -SET (H5G_HDRS +set (H5G_HDRS ${HDF5_SRC_DIR}/H5Gpkg.h ${HDF5_SRC_DIR}/H5Gpublic.h ) IDE_GENERATED_PROPERTIES ("H5G" "${H5G_HDRS}" "${H5G_SRCS}" ) -SET (H5HF_SRCS +set (H5HF_SRCS ${HDF5_SRC_DIR}/H5HF.c ${HDF5_SRC_DIR}/H5HFbtree2.c ${HDF5_SRC_DIR}/H5HFcache.c @@ -313,101 +313,101 @@ SET (H5HF_SRCS ${HDF5_SRC_DIR}/H5HFtiny.c ) -SET (H5HF_HDRS +set (H5HF_HDRS ${HDF5_SRC_DIR}/H5HFpkg.h ${HDF5_SRC_DIR}/H5HFpublic.h ) IDE_GENERATED_PROPERTIES ("H5HF" "${H5HF_HDRS}" "${H5HF_SRCS}" ) -SET (H5HG_SRCS +set (H5HG_SRCS ${HDF5_SRC_DIR}/H5HG.c ${HDF5_SRC_DIR}/H5HGcache.c ${HDF5_SRC_DIR}/H5HGdbg.c ${HDF5_SRC_DIR}/H5HGquery.c ) -SET (H5HG_HDRS +set (H5HG_HDRS ${HDF5_SRC_DIR}/H5HGpkg.h ${HDF5_SRC_DIR}/H5HGpublic.h ) IDE_GENERATED_PROPERTIES ("H5HG" "${H5HG_HDRS}" "${H5HG_SRCS}" ) -SET (H5HL_SRCS +set (H5HL_SRCS ${HDF5_SRC_DIR}/H5HL.c ${HDF5_SRC_DIR}/H5HLcache.c ${HDF5_SRC_DIR}/H5HLdbg.c ${HDF5_SRC_DIR}/H5HLint.c ) -SET (H5HL_HDRS +set (H5HL_HDRS ${HDF5_SRC_DIR}/H5HLpkg.h ${HDF5_SRC_DIR}/H5HLpublic.h ) IDE_GENERATED_PROPERTIES ("H5HL" "${H5HL_HDRS}" "${H5HL_SRCS}" ) -SET (H5HP_SRCS +set (H5HP_SRCS ${HDF5_SRC_DIR}/H5HP.c ) -SET (H5HP_HDRS +set (H5HP_HDRS ) IDE_GENERATED_PROPERTIES ("H5HP" "${H5HP_HDRS}" "${H5HP_SRCS}" ) -SET (H5I_SRCS +set (H5I_SRCS ${HDF5_SRC_DIR}/H5I.c ${HDF5_SRC_DIR}/H5Itest.c ) -SET (H5I_HDRS +set (H5I_HDRS ${HDF5_SRC_DIR}/H5Ipkg.h ${HDF5_SRC_DIR}/H5Ipublic.h ) IDE_GENERATED_PROPERTIES ("H5I" "${H5I_HDRS}" "${H5I_SRCS}" ) -SET (H5L_SRCS +set (H5L_SRCS ${HDF5_SRC_DIR}/H5L.c ${HDF5_SRC_DIR}/H5Lexternal.c ) -SET (H5L_HDRS +set (H5L_HDRS ${HDF5_SRC_DIR}/H5Lpkg.h ${HDF5_SRC_DIR}/H5Lpublic.h ) IDE_GENERATED_PROPERTIES ("H5L" "${H5L_HDRS}" "${H5L_SRCS}" ) -SET (H5MF_SRCS +set (H5MF_SRCS ${HDF5_SRC_DIR}/H5MF.c ${HDF5_SRC_DIR}/H5MFaggr.c ${HDF5_SRC_DIR}/H5MFdbg.c ${HDF5_SRC_DIR}/H5MFsection.c ) -SET (H5MF_HDRS +set (H5MF_HDRS ) IDE_GENERATED_PROPERTIES ("H5MF" "${H5MF_HDRS}" "${H5MF_SRCS}" ) -SET (H5MM_SRCS +set (H5MM_SRCS ${HDF5_SRC_DIR}/H5MM.c ) -SET (H5MM_HDRS +set (H5MM_HDRS ${HDF5_SRC_DIR}/H5MMpublic.h ) IDE_GENERATED_PROPERTIES ("H5MM" "${H5MM_HDRS}" "${H5MM_SRCS}" ) -SET (H5MP_SRCS +set (H5MP_SRCS ${HDF5_SRC_DIR}/H5MP.c ${HDF5_SRC_DIR}/H5MPtest.c ) -SET (H5MP_HDRS +set (H5MP_HDRS ${HDF5_SRC_DIR}/H5MPpkg.h ) IDE_GENERATED_PROPERTIES ("H5MP" "${H5MP_HDRS}" "${H5MP_SRCS}" ) -SET (H5O_SRCS +set (H5O_SRCS ${HDF5_SRC_DIR}/H5O.c ${HDF5_SRC_DIR}/H5Oainfo.c ${HDF5_SRC_DIR}/H5Oalloc.c @@ -443,14 +443,14 @@ SET (H5O_SRCS ${HDF5_SRC_DIR}/H5Ounknown.c ) -SET (H5O_HDRS +set (H5O_HDRS ${HDF5_SRC_DIR}/H5Opkg.h ${HDF5_SRC_DIR}/H5Opublic.h ${HDF5_SRC_DIR}/H5Oshared.h ) IDE_GENERATED_PROPERTIES ("H5O" "${H5O_HDRS}" "${H5O_SRCS}" ) -SET (H5P_SRCS +set (H5P_SRCS ${HDF5_SRC_DIR}/H5P.c ${HDF5_SRC_DIR}/H5Pacpl.c ${HDF5_SRC_DIR}/H5Pdapl.c @@ -471,50 +471,50 @@ SET (H5P_SRCS ${HDF5_SRC_DIR}/H5Ptest.c ) -SET (H5P_HDRS +set (H5P_HDRS ${HDF5_SRC_DIR}/H5Ppkg.h ${HDF5_SRC_DIR}/H5Ppublic.h ) IDE_GENERATED_PROPERTIES ("H5P" "${H5P_HDRS}" "${H5P_SRCS}" ) -SET (H5PL_SRCS +set (H5PL_SRCS ${HDF5_SRC_DIR}/H5PL.c ) -SET (H5PL_HDRS +set (H5PL_HDRS ${HDF5_SRC_DIR}/H5PLextern.h ) IDE_GENERATED_PROPERTIES ("H5PL" "${H5PL_HDRS}" "${H5PL_SRCS}" ) -SET (H5R_SRCS +set (H5R_SRCS ${HDF5_SRC_DIR}/H5R.c ${HDF5_SRC_DIR}/H5Rdeprec.c ) -SET (H5R_HDRS +set (H5R_HDRS ${HDF5_SRC_DIR}/H5Rpkg.h ${HDF5_SRC_DIR}/H5Rpublic.h ) IDE_GENERATED_PROPERTIES ("H5R" "${H5R_HDRS}" "${H5R_SRCS}" ) -SET (H5UC_SRCS +set (H5UC_SRCS ${HDF5_SRC_DIR}/H5UC.c ) -SET (H5UC_HDRS +set (H5UC_HDRS ) IDE_GENERATED_PROPERTIES ("H5UC" "${H5UC_HDRS}" "${H5UC_SRCS}" ) -SET (H5RS_SRCS +set (H5RS_SRCS ${HDF5_SRC_DIR}/H5RS.c ) -SET (H5RS_HDRS +set (H5RS_HDRS ) IDE_GENERATED_PROPERTIES ("H5RS" "${H5RS_HDRS}" "${H5RS_SRCS}" ) -SET (H5S_SRCS +set (H5S_SRCS ${HDF5_SRC_DIR}/H5S.c ${HDF5_SRC_DIR}/H5Sall.c ${HDF5_SRC_DIR}/H5Sdbg.c @@ -526,22 +526,22 @@ SET (H5S_SRCS ${HDF5_SRC_DIR}/H5Stest.c ) -SET (H5S_HDRS +set (H5S_HDRS ${HDF5_SRC_DIR}/H5Spkg.h ${HDF5_SRC_DIR}/H5Spublic.h ) IDE_GENERATED_PROPERTIES ("H5S" "${H5S_HDRS}" "${H5S_SRCS}" ) -SET (H5SL_SRCS +set (H5SL_SRCS ${HDF5_SRC_DIR}/H5SL.c ) -SET (H5SL_HDRS +set (H5SL_HDRS ) IDE_GENERATED_PROPERTIES ("H5SL" "${H5SL_HDRS}" "${H5SL_SRCS}" ) -SET (H5SM_SRCS +set (H5SM_SRCS ${HDF5_SRC_DIR}/H5SM.c ${HDF5_SRC_DIR}/H5SMbtree2.c ${HDF5_SRC_DIR}/H5SMcache.c @@ -549,21 +549,21 @@ SET (H5SM_SRCS ${HDF5_SRC_DIR}/H5SMtest.c ) -SET (H5SM_HDRS +set (H5SM_HDRS ${HDF5_SRC_DIR}/H5SMpkg.h ) IDE_GENERATED_PROPERTIES ("H5SM" "${H5SM_HDRS}" "${H5SM_SRCS}" ) -SET (H5ST_SRCS +set (H5ST_SRCS ${HDF5_SRC_DIR}/H5ST.c ) -SET (H5ST_HDRS +set (H5ST_HDRS ) IDE_GENERATED_PROPERTIES ("H5ST" "${H5ST_HDRS}" "${H5ST_SRCS}" ) -SET (H5T_SRCS +set (H5T_SRCS ${HDF5_SRC_DIR}/H5T.c ${HDF5_SRC_DIR}/H5Tarray.c ${HDF5_SRC_DIR}/H5Tbit.c @@ -589,38 +589,38 @@ SET (H5T_SRCS ${HDF5_SRC_DIR}/H5Tvlen.c ) -SET (H5T_HDRS +set (H5T_HDRS ${HDF5_SRC_DIR}/H5Tpkg.h ${HDF5_SRC_DIR}/H5Tpublic.h ) IDE_GENERATED_PROPERTIES ("H5T" "${H5T_HDRS}" "${H5T_SRCS}" ) -SET (H5TS_SRCS +set (H5TS_SRCS ${HDF5_SRC_DIR}/H5TS.c ) -SET (H5TS_HDRS +set (H5TS_HDRS ) IDE_GENERATED_PROPERTIES ("H5TS" "${H5TS_HDRS}" "${H5TS_SRCS}" ) -SET (H5VM_SRCS +set (H5VM_SRCS ${HDF5_SRC_DIR}/H5VM.c ) -SET (H5VM_HDRS +set (H5VM_HDRS ) IDE_GENERATED_PROPERTIES ("H5VM" "${H5VM_HDRS}" "${H5VM_SRCS}" ) -SET (H5WB_SRCS +set (H5WB_SRCS ${HDF5_SRC_DIR}/H5WB.c ) -SET (H5WB_HDRS +set (H5WB_HDRS ) IDE_GENERATED_PROPERTIES ("H5WB" "${H5WB_HDRS}" "${H5WB_SRCS}" ) -SET (H5Z_SRCS +set (H5Z_SRCS ${HDF5_SRC_DIR}/H5Z.c ${HDF5_SRC_DIR}/H5Zdeflate.c ${HDF5_SRC_DIR}/H5Zfletcher32.c @@ -630,19 +630,19 @@ SET (H5Z_SRCS ${HDF5_SRC_DIR}/H5Zszip.c ${HDF5_SRC_DIR}/H5Ztrans.c ) -IF (H5_ZLIB_HEADER) +if (H5_ZLIB_HEADER) SET_PROPERTY(SOURCE ${HDF5_SRC_DIR}/H5Zdeflate.c PROPERTY COMPILE_DEFINITIONS H5_ZLIB_HEADER="${H5_ZLIB_HEADER}") -ENDIF (H5_ZLIB_HEADER) +endif (H5_ZLIB_HEADER) -SET (H5Z_HDRS +set (H5Z_HDRS ${HDF5_SRC_DIR}/H5Zpkg.h ${HDF5_SRC_DIR}/H5Zpublic.h ) IDE_GENERATED_PROPERTIES ("H5Z" "${H5Z_HDRS}" "${H5Z_SRCS}" ) -SET (common_SRCS +set (common_SRCS ${H5_SRCS} ${H5A_SRCS} ${H5AC_SRCS} @@ -686,7 +686,7 @@ SET (common_SRCS ${H5Z_SRCS} ) -SET (H5_PUBLIC_HEADERS +set (H5_PUBLIC_HEADERS ${H5_HDRS} ${H5A_HDRS} ${H5AC_HDRS} @@ -720,7 +720,7 @@ SET (H5_PUBLIC_HEADERS ) -SET (H5_PRIVATE_HEADERS +set (H5_PRIVATE_HEADERS ${HDF5_SRC_DIR}/H5private.h ${HDF5_SRC_DIR}/H5Aprivate.h ${HDF5_SRC_DIR}/H5ACprivate.h @@ -766,35 +766,32 @@ SET (H5_PRIVATE_HEADERS ${HDF5_SRC_DIR}/H5win32defs.h ) -INCLUDE_DIRECTORIES (${HDF5_SOURCE_DIR}) -INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}) - #----------------------------------------------------------------------------- # Setup the H5Detect utility which generates H5Tinit with platform # specific type checks inside #----------------------------------------------------------------------------- -ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c) +add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c) TARGET_C_PROPERTIES (H5detect " " " ") -IF (MSVC) - TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib") -ENDIF (MSVC) +if (MSVC) + target_link_libraries (H5detect "ws2_32.lib") +endif (MSVC) -SET (CMD $<TARGET_FILE:H5detect>) -ADD_CUSTOM_COMMAND ( +set (CMD $<TARGET_FILE:H5detect>) +add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c COMMAND ${CMD} ARGS > ${HDF5_BINARY_DIR}/H5Tinit.c DEPENDS H5detect ) -ADD_EXECUTABLE (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) +add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) TARGET_C_PROPERTIES (H5make_libsettings " " " ") -IF (MSVC) - TARGET_LINK_LIBRARIES (H5make_libsettings "ws2_32.lib") -ENDIF (MSVC) +if (MSVC) + target_link_libraries (H5make_libsettings "ws2_32.lib") +endif (MSVC) -SET (CMD $<TARGET_FILE:H5make_libsettings>) -ADD_CUSTOM_COMMAND ( +set (CMD $<TARGET_FILE:H5make_libsettings>) +add_custom_command ( OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c COMMAND ${CMD} ARGS > ${HDF5_BINARY_DIR}/H5lib_settings.c @@ -802,21 +799,21 @@ ADD_CUSTOM_COMMAND ( WORKING_DIRECTORY ${HDF5_BINARY_DIR} ) -ADD_CUSTOM_COMMAND ( +add_custom_command ( TARGET ${HDF5_BINARY_DIR}/H5Edefin.h PRE_BUILD COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SOURCE_DIR}/src/H5err.txt COMMENT " Creating err headers" ) -ADD_CUSTOM_COMMAND ( +add_custom_command ( TARGET ${HDF5_BINARY_DIR}/H5version.h PRE_BUILD COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SOURCE_DIR}/src/H5vers.txt COMMENT " Creating API version macro" ) -ADD_CUSTOM_COMMAND ( +add_custom_command ( TARGET ${HDF5_BINARY_DIR}/H5overflow.h PRE_BUILD COMMAND ${CMAKE_COMMAND} -E perl ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SOURCE_DIR}/src/H5overflow.txt @@ -826,51 +823,64 @@ ADD_CUSTOM_COMMAND ( #----------------------------------------------------------------------------- # Add H5Tinit source to build - generated by H5Detect/CMake at configure time #----------------------------------------------------------------------------- -SET (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5Tinit.c) -SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5Tinit.c GENERATED) -SET (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5lib_settings.c) -SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5lib_settings.c GENERATED) -SET (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5Edefin.h) -SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5Edefin.h GENERATED) -SET (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5version.h) -SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5version.h GENERATED) -SET (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5overflow.h) -SET_SOURCE_FILES_PROPERTIES (${HDF5_BINARY_DIR}/H5overflow.h GENERATED) - -ADD_LIBRARY (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) +set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5Tinit.c) +set_source_files_properties (${HDF5_BINARY_DIR}/H5Tinit.c GENERATED) +set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5lib_settings.c) +set_source_files_properties (${HDF5_BINARY_DIR}/H5lib_settings.c GENERATED) +set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5Edefin.h) +set_source_files_properties (${HDF5_BINARY_DIR}/H5Edefin.h GENERATED) +set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5version.h) +set_source_files_properties (${HDF5_BINARY_DIR}/H5version.h GENERATED) +set (common_SRCS ${common_SRCS} ${HDF5_BINARY_DIR}/H5overflow.h) +set_source_files_properties (${HDF5_BINARY_DIR}/H5overflow.h GENERATED) + +add_library (${HDF5_LIB_TARGET} ${LIB_TYPE} ${common_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS}) TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} " " " ") -TARGET_LINK_LIBRARIES (${HDF5_LIB_TARGET} ${LINK_LIBS}) -IF (NOT WIN32) - TARGET_LINK_LIBRARIES (${HDF5_LIB_TARGET} dl) -ENDIF (NOT WIN32) -SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) +target_link_libraries (${HDF5_LIB_TARGET} ${LINK_LIBS}) +if (NOT WIN32) + target_link_libraries (${HDF5_LIB_TARGET} dl) +endif (NOT WIN32) +set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} ${LIB_TYPE}) -SET_TARGET_PROPERTIES (${HDF5_LIB_TARGET} PROPERTIES FOLDER libraries) +set_target_properties (${HDF5_LIB_TARGET} PROPERTIES + FOLDER libraries + INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>" +) + +option (HDF5_ENABLE_DEBUG_APIS "Turn on debugging in all packages" OFF) +if (HDF5_ENABLE_DEBUG_APIS) + set_target_properties (${HDF5_LIB_TARGET} PROPERTIES + COMPILE_DEFINITIONS + "-DH5Z_DEBUG -DH5VM_DEBUG -DH5T_DEBUG + -DH5S_DEBUG -DH5P_DEBUG -DH5O_DEBUG -DH5MM_DEBUG -DH5MF_DEBUG + -DH5I_DEBUG -DH5HL_DEBUG -DH5HG_DEBUG -DH5G_DEBUG -DH5F_DEBUG + -DH5E_DEBUG -DH5D_DEBUG -DH5B_DEBUG -DH5AC_DEBUG -UNDEBUG" + ) +endif (HDF5_ENABLE_DEBUG_APIS) #----------------------------------------------------------------------------- # Add file(s) to CMake Install #----------------------------------------------------------------------------- -IF (NOT HDF5_INSTALL_NO_DEVELOPMENT) - INSTALL ( +if (NOT HDF5_INSTALL_NO_DEVELOPMENT) + install ( FILES ${H5_PUBLIC_HEADERS} - ${H5_PRIVATE_HEADERS} DESTINATION ${HDF5_INSTALL_INCLUDE_DIR} COMPONENT headers ) -ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT) +endif (NOT HDF5_INSTALL_NO_DEVELOPMENT) #----------------------------------------------------------------------------- # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- -IF (HDF5_EXPORTED_TARGETS) - IF (BUILD_SHARED_LIBS) +if (HDF5_EXPORTED_TARGETS) + if (BUILD_SHARED_LIBS) INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} libraries) - ENDIF (BUILD_SHARED_LIBS) + endif (BUILD_SHARED_LIBS) - INSTALL ( + install ( TARGETS ${HDF5_LIB_TARGET} EXPORT @@ -879,4 +889,4 @@ IF (HDF5_EXPORTED_TARGETS) ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT libraries ) -ENDIF (HDF5_EXPORTED_TARGETS) +endif (HDF5_EXPORTED_TARGETS) |