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

[vlpp] Fix configure issues, export unofficial target #26887

Merged
merged 28 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
20 changes: 14 additions & 6 deletions ports/vlpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.3.0)

project(Vlpp VERSION 0.10.0.0 LANGUAGES CXX)

option(SKIP_HEADERS "Skip header installation" OFF)

# Sources
set(SRCS
Import/Vlpp.cpp
Expand All @@ -18,23 +20,29 @@ if(NOT CMAKE_CXX_STANDARD)
endif()

# Create and configure the target
add_library(Vlpp ${SRCS})
add_library(Vlpp INTERFACE ${SRCS})
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved

# target_compile_definitions
target_compile_definitions(Vlpp PRIVATE UNICODE)
target_compile_definitions(Vlpp PRIVATE _UNICODE)
target_compile_definitions(Vlpp INTERFACE UNICODE)
target_compile_definitions(Vlpp INTERFACE _UNICODE)

target_include_directories(Vlpp PRIVATE ${PROJECT_SOURCE_DIR}/Import)
target_include_directories(Vlpp INTERFACE $<INSTALL_INTERFACE:Import>)

# Install
install(
TARGETS Vlpp
EXPORT unofficial-vlpp
RUNTIME DESTINATION "bin"
LIBRARY DESTINATION "lib"
ARCHIVE DESTINATION "lib"
)
)

install(EXPORT unofficial-vlpp
NAMESPACE unofficial::vlpp::
DESTINATION share/unofficial-vlpp
)

if (NOT DEFINED SKIP_HEADERS)
if (NOT SKIP_HEADERS)
install(
FILES
Import/Vlpp.h
Expand Down
10 changes: 6 additions & 4 deletions ports/vlpp/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO vczh-libraries/Release
Expand All @@ -13,15 +11,19 @@ file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_DEBUG
-DSKIP_HEADERS=ON
)

vcpkg_cmake_install()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-vlpp)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved

# Tools
file(INSTALL "${SOURCE_PATH}/Tools/CppMerge.exe" DESTINATION "${CURRENT_PACKAGES_DIR}/tools")

# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vlpp" RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 5 additions & 1 deletion ports/vlpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{
"name": "vlpp",
"version": "0.11.0.0",
"port-version": 3,
"port-version": 4,
"description": "Common C++ construction, including string operation / generic container / linq / General-LR parser generator / multithreading / reflection for C++ / etc",
"homepage": "https://github.com/vczh-libraries/Release",
"license": null,
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7666,7 +7666,7 @@
},
"vlpp": {
"baseline": "0.11.0.0",
"port-version": 3
"port-version": 4
},
"volk": {
"baseline": "1.3.204",
Expand Down
5 changes: 5 additions & 0 deletions versions/v-/vlpp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d593e711f4b1ee56e84b9cfe4fab3bcc79fc602e",
"version": "0.11.0.0",
"port-version": 4
},
{
"git-tree": "b4f56db04c13b5bf335e4e5939617596e15e89ac",
"version": "0.11.0.0",
Expand Down