Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ports/g3log/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Source: g3log
Version: 2019-05-14-1
Description: Asynchronous logger with Dynamic Sinks
41 changes: 41 additions & 0 deletions ports/g3log/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KjellKod/g3log
REF 376c417ad170228fa6d1b9994a6e07a2ac143a51
SHA512 fd442b895f0be2489d2be099b1faca5c964f1a3880e3867726efb5f5a17192fbf2c2d60cf118e1b68bea73cf328f0b16c0265ec0f0c0fbbb1f62f68a994f5b86
HEAD_REF master
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" G3_SHARED_LIB)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" G3_SHARED_RUNTIME)

# https://github.com/KjellKod/g3log#prerequisites
set(VERSION "1.3.2-95")

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DG3_SHARED_LIB=${G3_SHARED_LIB} # Options.cmake
-DG3_SHARED_RUNTIME=${G3_SHARED_RUNTIME} # Options.cmake
-DADD_FATAL_EXAMPLE=OFF
-DADD_G3LOG_BENCH_PERFORMANCE=OFF
-DADD_G3LOG_UNIT_TEST=OFF
-DVERSION=${VERSION}
)

vcpkg_install_cmake()

vcpkg_copy_pdbs()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/g3logger TARGET_PATH share/g3logger)

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

# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)

# CMake integration test
vcpkg_test_cmake(PACKAGE_NAME g3logger)