mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 06:47:50 +08:00
3e2409f47d
* [vtk-m] new port vtk-m * [VTK] Update to 9.0 * include local buildtree changes * [pcl] disable VTK due to API changes in VTK 9.0 * [vtk-m] add supports field to be only x64 * [vtk-dicom] add python executable. * fix vtkm dependency * [vtk-dicom] fix missing std:: namespace * [vtk-m] add uwp to unsupported triplets * [vtk] add pegtl include patch, reenable IOMotionFX * remove hdf5 changes for testing * use different pgetl patch which redirects to the installed config of pegtl * [pegtl-2] version file needs renaming too * [vtk] change dependency to pgetl-2 and fix the patch * [vtk] put in hdf5 fix again and correct manually installed include files * remove deprecated function to retrigger CI * [lz4] correctly lowercase the lz4 config * [vtk] remove unnecessary code * [pegtl-2] add homepage * [pegtl] modernize portfiles * [vtk-dicom] add homepage * [vtk-dicom] modernize portfile * [vtk-m] remove empty build depends * [vtk] try fixing the permission issue * bump control * Update FindHDF5.cmake * Update pegtl.patch * Update ports/vtk/pegtl.patch Co-authored-by: nicole mazzuca <mazzucan@outlook.com> * [vtk] refactor portfile, added a few deps on [core] and added feature cuda * [vtk] pegtl.patch: Add additional found message * [vtk-m] add more documentation comments * [vtk] fix string replacement Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
50 lines
1.7 KiB
CMake
50 lines
1.7 KiB
CMake
cmake_minimum_required(VERSION 3.0)
|
|
project(lz4 C)
|
|
|
|
if(MSVC AND BUILD_SHARED_LIBS)
|
|
add_definitions(-DLZ4_DLL_EXPORT)
|
|
endif()
|
|
add_definitions(-DXXH_NAMESPACE=LZ4_)
|
|
|
|
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Install prefix")
|
|
set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed")
|
|
set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed")
|
|
set(INSTALL_INCLUDE_DIR "include" CACHE PATH "Path where headers will be installed")
|
|
set(INSTALL_CMAKE_DIR "share/lz4" CACHE PATH "Path where cmake configs will be installed")
|
|
|
|
file(GLOB LZ4_HEADERS lib/*.h)
|
|
|
|
add_library(lz4
|
|
${LZ4_HEADERS}
|
|
lib/lz4.c
|
|
lib/lz4frame.c
|
|
lib/lz4hc.c
|
|
lib/xxhash.c
|
|
)
|
|
|
|
target_include_directories(lz4 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/lib> $<INSTALL_INTERFACE:include>)
|
|
set_target_properties(lz4 PROPERTIES PUBLIC_HEADER ${LZ4_HEADERS})
|
|
|
|
install(TARGETS lz4
|
|
EXPORT lz4Config
|
|
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
|
|
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
|
|
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
|
|
PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}"
|
|
PRIVATE_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}"
|
|
COMPONENT dev
|
|
)
|
|
|
|
FILE(GLOB lz4h "${CMAKE_CURRENT_LIST_DIR}/lib/*.h")
|
|
list(REMOVE_ITEM lz4h "${CMAKE_CURRENT_LIST_DIR}/lib/xxhash.h")
|
|
INSTALL(FILES ${lz4h} DESTINATION "${INSTALL_INCLUDE_DIR}")
|
|
|
|
install(EXPORT lz4Config
|
|
FILE lz4-config.cmake
|
|
NAMESPACE lz4::
|
|
DESTINATION "${INSTALL_CMAKE_DIR}"
|
|
)
|
|
|
|
# Export the package for use from the build-tree (this registers the build-tree with a global CMake-registry)
|
|
export(PACKAGE lz4)
|