aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoratkawa7 <atkawa7@yahoo.com>2017-07-06 19:59:56 -0700
committeratkawa7 <atkawa7@yahoo.com>2017-07-06 19:59:56 -0700
commitf354d6b31dc626ed649c3c679378965a8c8117c8 (patch)
treeb65fc1c071799ea8e05c9b140dc4d9d2b3368cb9
parent330043341cb28da7bb121f29199cf72fff36b66a (diff)
downloadvcpkg-f354d6b31dc626ed649c3c679378965a8c8117c8.tar.gz
vcpkg-f354d6b31dc626ed649c3c679378965a8c8117c8.zip
[matio] Fixed issues with customer cmakelists.txt
-rw-r--r--ports/matio/CMakeLists.txt50
1 files changed, 12 insertions, 38 deletions
diff --git a/ports/matio/CMakeLists.txt b/ports/matio/CMakeLists.txt
index eaecf304b..60f8e76d7 100644
--- a/ports/matio/CMakeLists.txt
+++ b/ports/matio/CMakeLists.txt
@@ -16,30 +16,12 @@ set(SRC
src/snprintf.c
)
-set(
- HEADERS
- src/mat4.h
- src/mat5.h
- src/mat73.h
- src/matio.h
- src/matio_private.h
- visual_studio/matio_pubconf.h
- visual_studio/matioConfig.h
-)
-
+include_directories(src visual_studio)
add_library(libmatio ${SRC})
-
-set(COMMON_INCLUDES ${PROJECT_BINARY_DIR}/includes)
-
-file(COPY ${HEADERS} DESTINATION ${COMMON_INCLUDES})
-
-#fixes issues with relative directories
include_directories(${COMMON_INCLUDES})
-option(BUILD_SHARED_LIBRARY ON)
-
add_definitions(
-DH5_NO_DEPRECATED_SYMBOLS
-DMAT73=1 -DREPLACE_GETOPT
@@ -47,30 +29,23 @@ add_definitions(
-DMATIO_HAVE_STDINT_H=1
)
-if(BUILD_SHARED_LIBRARY)
- add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB)
- set(HDF5_USE_STATIC_LIBRARIES OFF)
+if(BUILD_SHARED_LIBS)
+ add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB)
else()
- set(HDF5_USE_STATIC_LIBRARIES ON)
+ add_definitions(-DH5_BUILT_AS_STATIC_LIB)
endif()
-find_package( ZLIB REQUIRED )
+find_package(ZLIB REQUIRED)
-if (ZLIB_FOUND)
- include_directories( ${ZLIB_INCLUDE_DIRS} )
- target_link_libraries(libmatio ${ZLIB_LIBRARIES})
- add_definitions(-DHAVE_ZLIB=1)
-endif( ZLIB_FOUND )
+include_directories( ${ZLIB_INCLUDE_DIRS} )
+target_link_libraries(libmatio ${ZLIB_LIBRARIES})
+add_definitions(-DHAVE_ZLIB=1)
-find_package( HDF5 REQUIRED)
-
-if(HDF5_FOUND)
- include_directories( ${HDF5_INCLUDE_DIRS} )
- target_link_libraries(libmatio ${HDF5_C_LIBRARIES})
- add_definitions(-DHAVE_HDF5=1)
-endif()
+find_package(HDF5 REQUIRED)
-message(STATUS ${HDF5_C_LIBRARIES})
+include_directories( ${HDF5_INCLUDE_DIRS} )
+target_link_libraries(libmatio ${HDF5_C_LIBRARIES})
+add_definitions(-DHAVE_HDF5=1)
install(
TARGETS libmatio
@@ -83,7 +58,6 @@ if(NOT DISABLE_INSTALL_HEADERS)
install(FILES
src/matio.h
visual_studio/matio_pubconf.h
- visual_studio/matioConfig.h
DESTINATION include
)
endif()