Skip to content

Commit

Permalink
Rename libfaketime port
Browse files Browse the repository at this point in the history
  • Loading branch information
dudoslav committed Apr 3, 2024
1 parent eadb63b commit 7fc4610
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
21 changes: 10 additions & 11 deletions ports/libfaketime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ project(libfaketime VERSION 0.9.10)

add_library(
${PROJECT_NAME}
SHARED
src/libfaketime.c
)

Expand Down Expand Up @@ -34,25 +33,25 @@ install(TARGETS ${PROJECT_NAME}
)

install(EXPORT ${PROJECT_NAME}
FILE ${PROJECT_NAME}-targets.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
NAMESPACE libfaketime::
FILE unofficial-${PROJECT_NAME}-targets.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-${PROJECT_NAME}
NAMESPACE unofficial::libfaketime::
)

include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

configure_package_config_file(
${PROJECT_NAME}-config.cmake.in
${PROJECT_NAME}-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
unofficial-${PROJECT_NAME}-config.cmake.in
unofficial-${PROJECT_NAME}-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-${PROJECT_NAME})

write_basic_package_version_file(
${PROJECT_NAME}-config-version.cmake
unofficial-${PROJECT_NAME}-config-version.cmake
VERSION ${CMAKE_PROJECT_VERSION}
COMPATIBILITY SameMajorVersion)

install(FILES
${CMAKE_BINARY_DIR}/${PROJECT_NAME}-config.cmake
${CMAKE_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
${CMAKE_BINARY_DIR}/unofficial-${PROJECT_NAME}-config.cmake
${CMAKE_BINARY_DIR}/unofficial-${PROJECT_NAME}-config-version.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-${PROJECT_NAME})
5 changes: 0 additions & 5 deletions ports/libfaketime/libfaketime-config.cmake.in

This file was deleted.

9 changes: 5 additions & 4 deletions ports/libfaketime/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO wolfcw/libfaketime
Expand All @@ -6,7 +8,7 @@ vcpkg_from_github(
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/libfaketime-config.cmake.in" DESTINATION "${SOURCE_PATH}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-libfaketime-config.cmake.in" DESTINATION "${SOURCE_PATH}")

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
Expand All @@ -15,10 +17,9 @@ vcpkg_cmake_configure(
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
# vcpkg_copy_tools(TOOL_NAMES faketime AUTO_CLEAN)
vcpkg_cmake_config_fixup(
CONFIG_PATH lib/cmake/libfaketime
PACKAGE_NAME libfaketime)
CONFIG_PATH lib/cmake/unofficial-libfaketime
PACKAGE_NAME unofficial-libfaketime)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

Expand Down
5 changes: 5 additions & 0 deletions ports/libfaketime/unofficial-libfaketime-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libfaketime-targets.cmake")

check_required_components("unofficial-libfaketime")
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ endif()

# Only produce timing tests for UNIX based systems (faketime constraint)
if (NOT MSVC)
find_package(libfaketime REQUIRED)
find_package(unofficial-libfaketime REQUIRED)

# unit test executable
add_executable(
Expand All @@ -383,7 +383,7 @@ if (NOT MSVC)
target_link_libraries(
tiledb_timing_unit
PUBLIC
libfaketime::libfaketime
unofficial::libfaketime::libfaketime
TILEDB_CORE_OBJECTS_ILIB
TILEDB_CORE_OBJECTS
Catch2::Catch2
Expand Down

0 comments on commit 7fc4610

Please sign in to comment.