forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clue] Add new port (microsoft#7564)
* [clue] Add new port
- Loading branch information
1 parent
bf5e7b2
commit 17723de
Showing
3 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
project(clue VERSION 1.0.0 LANGUAGES CXX) | ||
|
||
option(CLUE_BUILD_TEST "Build tests for clue" OFF) | ||
option(CLUE_BUILD_EXAMPLE "Build examples" OFF) | ||
|
||
include(GNUInstallDirs) | ||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/clue.hpp") | ||
|
||
if(CLUE_BUILD_TEST) | ||
file(GLOB TEST_SOURCES "tests/*.cpp") | ||
add_executable(test_clue ${TEST_SOURCES}) | ||
target_include_directories(test_clue PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/tests) | ||
install(TARGETS test_clue | ||
RUNTIME DESTINATION tools) | ||
endif() | ||
|
||
if(CLUE_BUILD_EXAMPLE) | ||
file(GLOB EXAMPLES "examples/*.cpp") | ||
install(FILES ${EXAMPLES} DESTINATION examples) | ||
endif() | ||
|
||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/clue.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | ||
# end of file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
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. | ||
|
||
Feature: test | ||
Description: Build test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
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_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
test CLUE_BUILD_TEST | ||
) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS ${FEATURE_OPTIONS} | ||
) | ||
|
||
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) |