-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new vcpkg distribution files, and enable being built as a shared …
…library. Adds to #41
- Loading branch information
Showing
14 changed files
with
170 additions
and
44 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 |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
!examples/** | ||
!include | ||
!include/** | ||
!distribution | ||
!distribution/** | ||
!tools | ||
!tools/** | ||
!.git* | ||
|
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
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,27 @@ | ||
# infoware - C++ System information Library | ||
# | ||
# Written in 2016-2020 by nabijaczleweli <nabijaczleweli@gmail.com> and ThePhD <phdofthehouse@gmail.com> | ||
# | ||
# To the extent possible under law, the author(s) have dedicated all copyright and related | ||
# and neighboring rights to this software to the public domain worldwide. This software is | ||
# distributed without any warranty. | ||
# | ||
# You should have received a copy of the CC0 Public Domain Dedication along with this software. | ||
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/> | ||
|
||
# vcpkg CONTROL file for infoware | ||
Source: infoware | ||
Version: v0.5.2 | ||
Description: C++ Library for pulling system and hardware information, without hitting the command line. | ||
|
||
Feature: x11 | ||
Description: Prefer usage of X11 to find graphical capabilities. | ||
|
||
Feature: d3d | ||
Description: Prefer usage of Direct3D to find graphical capabilities (typically only works on Windows systems). | ||
|
||
Feature: opencl | ||
Description: Prefer usage of OpenCL to find graphical capabilities of the system. | ||
|
||
Feature: opengl | ||
Description: Prefer usage of OpenGL to find graphical capabilities (may require additional libraries to be available for linking depending on the system). |
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,52 @@ | ||
# infoware - C++ System information Library | ||
# | ||
# Written in 2016-2020 by nabijaczleweli <nabijaczleweli@gmail.com> and ThePhD <phdofthehouse@gmail.com> | ||
# | ||
# To the extent possible under law, the author(s) have dedicated all copyright and related | ||
# and neighboring rights to this software to the public domain worldwide. This software is | ||
# distributed without any warranty. | ||
# | ||
# You should have received a copy of the CC0 Public Domain Dedication along with this software. | ||
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/> | ||
|
||
# vcpkg portfile.cmake file for infoware | ||
|
||
include(vcpkg_common_functions) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO ThePhD/infoware | ||
REF v0.5.2 | ||
SHA512 ed3b4384c135ebdcead21afc3b5ccb790d7058f5dadfb31a5be52e10078d9140851e2971f3e974a9915dd8a5d2615be3bcee2270baf145b921f46b27c8182cd7 | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_check_features( | ||
OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
x11 INFOWARE_USE_X11 | ||
d3d INFOWARE_USE_D3D | ||
opencl INFOWARE_USE_OPENCL | ||
opengl INFOWARE_USE_OPENGL | ||
) | ||
|
||
vcpkg_find_acquire_program(GIT) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS | ||
${FEATURE_OPTIONS} | ||
-DINFOWARE_EXAMPLES=OFF | ||
-DINFOWARE_TESTS=OFF | ||
-DGIT_EXECUTABLE=${GIT} | ||
-DGIT_FOUND=true | ||
) | ||
|
||
vcpkg_install_cmake() | ||
|
||
# make sure the LICENSE file is present as the copyright file | ||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/infoware RENAME copyright) | ||
# remove things for debug version of how vcpkg does stuff...? | ||
# they also handle share stuff and configuration for debug vs. release, so not our responsibility | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") |
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
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
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,32 @@ | ||
// infoware - C++ System information Library | ||
// | ||
// Written in 2016-2020 by nabijaczleweli <nabijaczleweli@gmail.com> and ThePhD <phdofthehouse@gmail.com> | ||
// | ||
// To the extent possible under law, the author(s) have dedicated all copyright and related | ||
// and neighboring rights to this software to the public domain worldwide. This software is | ||
// distributed without any warranty. | ||
// | ||
// You should have received a copy of the CC0 Public Domain Dedication along with this software. | ||
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/> | ||
|
||
|
||
#pragma once | ||
|
||
#if defined _MSC_VER | ||
#if defined INFOWARE_DLL | ||
#if defined INFOWARE_BUILDING | ||
#define INFOWARE_API_LINKAGE __declspec(dllexport) | ||
#define INFOWARE_API_LINKAGE_INTERNAL | ||
#else | ||
#define INFOWARE_API_LINKAGE __declspec(dllimport) | ||
#define INFOWARE_API_LINKAGE_INTERNAL | ||
#endif // FICAPI_BUILD - Building the Library vs. Using the Library | ||
#else | ||
#define INFOWARE_API_LINKAGE | ||
#define INFOWARE_API_LINKAGE_INTERNAL | ||
#endif // Building a DLL vs. Static Library | ||
#else // g++ / clang++ | ||
#define INFOWARE_API_LINKAGE __attribute__((visibility("default"))) | ||
#define INFOWARE_API_LINKAGE_INTERNAL __attribute__((visibility("hidden"))) | ||
#endif // MSVC vs. other shared object / dll attributes | ||
|
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
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
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
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
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
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
Oops, something went wrong.