forked from intel/hexl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add config file for vcpkg (intel#10)
* add config file for vcpkg * added examples, update example readme * update CI pipeline * add build type * update comments * test * test * test * update test * add sequential jobs * update PKG_CONFIG_PATH * update PKG_CONFIG_PATH * set env variable for vcpkg * remove dependency * add pkg-config to Shared Build
- Loading branch information
1 parent
e0dc9b0
commit f591537
Showing
10 changed files
with
226 additions
and
49 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
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 |
---|---|---|
|
@@ -14,3 +14,4 @@ docs/doxygen/ | |
Doxyfile | ||
hexl/include/hexl/util/defines.hpp | ||
cmake/hexl-*.*.*/HEXLConfig.cmake | ||
pkgconfig/hexl.pc |
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 |
---|---|---|
@@ -1,12 +1,28 @@ | ||
# Example using Intel HEXL in an external application | ||
|
||
To use Intel HEXL in an external application, first install Intel HEXL. Then, in your external application, add the following lines to your `CMakeLists.txt`: | ||
To use Intel HEXL in an external application, you can use one of the three provided ways. | ||
|
||
* Install Intel HEXL. Then, in your external application, add the following lines to your `CMakeLists.txt`: | ||
|
||
```bash | ||
find_package(HEXL 1.1.1 | ||
HINTS ${HEXL_HINT_DIR} | ||
REQUIRED) | ||
target_link_libraries(<your target> hexl) | ||
target_link_libraries(<your target> HEXL::hexl) | ||
``` | ||
If Intel HEXL is installed globally, `HEXL_HINT_DIR` is not needed. Otherwise, `HEXL_HINT_DIR` should be the directory containing `HEXLConfig.cmake`, e.g. `${CMAKE_INSTALL_PREFIX}/lib/cmake/hexl-1.1.1/` | ||
|
||
* Install Intel HEXL. Then, in your external application, add the following lines to your `CMakeLists.txt`: | ||
|
||
```bash | ||
include(FindPkgConfig) | ||
pkg_check_modules(HEXL REQUIRED IMPORTED_TARGET hexl) | ||
target_link_libraries(<your target> PkgConfig::HEXL) | ||
``` | ||
|
||
If Intel HEXL is installed globally, `HEXL_HINT_DIR` is not needed. Otherwise, `HEXL_HINT_DIR` should be the directory containing `HEXLConfig.cmake`, e.g. `${CMAKE_INSTALL_PREFIX}/lib/cmake/hexl-1.1.0/` | ||
* Install Intel HEXL from vcpkg. Then, in your external application, add the following lines to your `CMakeLists.txt`: | ||
|
||
```bash | ||
find_package(HEXL CONFIG REQUIRED) | ||
target_link_libraries(<your target> HEXL::hexl) | ||
``` |
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,17 @@ | ||
# Copyright (C) 2020-2021 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
project(hexl_example LANGUAGES C CXX) | ||
cmake_minimum_required(VERSION 3.5.1) | ||
set(CMAKE_CXX_STANDARD 11) | ||
|
||
# Example using pkg_check_modules | ||
include(FindPkgConfig) | ||
if(NOT PKG_CONFIG_FOUND) | ||
message(FATAL_ERROR "pkg-config not found!" ) | ||
endif() | ||
|
||
pkg_check_modules(HEXL REQUIRED IMPORTED_TARGET hexl) | ||
|
||
add_executable(example ../example.cpp) | ||
target_link_libraries(example PkgConfig::HEXL) |
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,17 @@ | ||
# Copyright (C) 2020-2021 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
project(hexl_example LANGUAGES C CXX) | ||
cmake_minimum_required(VERSION 3.5.1) | ||
set(CMAKE_CXX_STANDARD 11) | ||
|
||
# Example using vcpkg | ||
find_package(HEXL CONFIG REQUIRED) | ||
if(NOT HEXL_FOUND) | ||
message(FATAL_ERROR "HEXL: not found") | ||
else() | ||
message(STATUS "HEXL: found") | ||
endif() | ||
|
||
add_executable(example ../example.cpp) | ||
target_link_libraries(example PRIVATE HEXL::hexl) |
Oops, something went wrong.