Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clue] Add new port #7564

Merged
merged 2 commits into from
Aug 29, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
23 changes: 23 additions & 0 deletions ports/clue/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
cmake_minimum_required( VERSION 3.5)

project(clue VERSION 1.0.0 LANGUAGES CXX )

option( CLUE_BUILD_TEST "Build tests for clue" ON )
option( CLUE_BUILD_EXAMPLE "Build examples" ON )

include( GNUInstallDirs )
include_directories( "${CMAKE_SOURCE_DIR}/clue.hpp" )

if ( CLUE_BUILD_TEST )
Rastaban marked this conversation as resolved.
Show resolved Hide resolved
enable_testing()
add_subdirectory( tests )
endif()

if ( CLUE_BUILD_EXAMPLE )
enable_testing()
add_subdirectory( examples )
endif()

install( FILES ${CMAKE_SOURCE_DIR}/clue.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )

# end of file
6 changes: 6 additions & 0 deletions ports/clue/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Source: clue
Version: 1.0.0-alpha.7
Homepage: https://github.com/martinmoene/clue
Description: clue is a C++03 header-only library to log messages with a severity and optional module identifier.


28 changes: 28 additions & 0 deletions ports/clue/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO martinmoene/clue
REF v1.0.0-alpha.7
SHA512 4f0d1115dcf16412239e1ac158be210403f93596b76c91100ae81be3d4f4cb04dda525101850356a7195b219c826305a82cab7a96b1bc1e2cefaa7860a853e73
HEAD_REF master
)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCLUE_BUILD_TEST=OFF
-DCLUE_BUILD_EXAMPLE=OFF
)

vcpkg_install_cmake()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)

# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)