Skip to content

Commit 211f8cc

Browse files
committed
add vcpkg overlay port for cpptest and fix lua include paths in target
1 parent 9eb3427 commit 211f8cc

File tree

5 files changed

+48
-1
lines changed

5 files changed

+48
-1
lines changed

nel/src/gui/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ add_project_library_alias(nelgui gui)
88

99
TARGET_INCLUDE_DIRECTORIES(nelgui
1010
PUBLIC
11-
${LUA_INCLUDE_DIR}
11+
$<BUILD_INTERFACE:${LUA_INCLUDE_DIR}>
12+
$<INSTALL_INTERFACE:include>
1213
PRIVATE
1314
${LUABIND_INCLUDE_DIR}
1415
${CURL_INCLUDE_DIRS}

vcpkg-ports/cpptest/portfile.cmake

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2+
3+
vcpkg_from_github(
4+
OUT_SOURCE_PATH SOURCE_PATH
5+
REPO cpptest/cpptest
6+
# release 2.0.0 does not contain the README fix
7+
#REF "${VERSION}"
8+
REF 6cefc1a39367439ed49e5f3eb0d51a59b621c40f
9+
SHA512 37f224be0de32d02f3c028caa76a0ec7864ae7aac30f0a77d52ed1c6f6e5e2794d4e78f23cea7294a771bb36a9e846942e9ebe04f74906e7449441db3e72c9ec
10+
HEAD_REF master
11+
)
12+
13+
vcpkg_make_configure(
14+
SOURCE_PATH "${SOURCE_PATH}"
15+
AUTORECONF
16+
)
17+
18+
vcpkg_make_install()
19+
20+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
21+
22+
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
23+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

vcpkg-ports/cpptest/usage

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
vcpkg-sample-library provides CMake targets:
2+
3+
find_package(CppTest REQUIRED)
4+
5+
target_link_libraries(main PRIVATE ${CPPTEST_LIBRARIES})
6+
target_include_directories(main PRIVATE ${CPPTEST_INCLUDE_DIR})

vcpkg-ports/cpptest/vcpkg.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
3+
"name": "cpptest",
4+
"version": "2.0.0",
5+
"description": "Powerful, yet simple, C++ unit testing framework",
6+
"homepage": "https://github.com/cpptest/cpptest",
7+
"license": "LGPL-2.1",
8+
"dependencies": [
9+
"boost",
10+
"lua",
11+
{
12+
"name": "vcpkg-make",
13+
"host": true
14+
}
15+
]
16+
}

vcpkg.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
33
"dependencies": [
4+
"cpptest",
45
"curl",
56
"ffmpeg",
67
"freetype",

0 commit comments

Comments
 (0)