forked from conan-io/conan-center-index
-
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.
(conan-io#15300) libcap: modernize more
- Loading branch information
1 parent
8380682
commit 8184c55
Showing
7 changed files
with
89 additions
and
102 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
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,8 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
project(PackageTest LANGUAGES C) | ||
cmake_minimum_required(VERSION 3.1) | ||
project(test_package LANGUAGES C) | ||
|
||
find_package(PkgConfig REQUIRED) | ||
pkg_check_modules(CAP REQUIRED IMPORTED_TARGET libcap) | ||
|
||
add_executable(example example.c) | ||
target_link_libraries(example PRIVATE PkgConfig::CAP) | ||
add_executable(${PROJECT_NAME} test_package.c) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::CAP) |
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
File renamed without changes.
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,23 +1,22 @@ | ||
import os | ||
|
||
from conan import ConanFile | ||
from conan.tools.build import cross_building | ||
from conans import ConanFile, tools | ||
from conans import CMake | ||
|
||
|
||
class LibcapTestConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
class TestPackageConan(ConanFile): | ||
settings = "os", "arch", "compiler", "build_type" | ||
generators = "cmake", "pkg_config" | ||
|
||
def build_requirements(self): | ||
self.tool_requires("pkgconf/1.9.3") | ||
self.build_requires("pkgconf/1.9.3") | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def test(self): | ||
if not cross_building(self): | ||
bin_path = os.path.join("bin", "example") | ||
if not tools.cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run(bin_path, run_environment=True) |
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,19 +1,19 @@ | ||
versions: | ||
"2.45": | ||
"2.66": | ||
folder: all | ||
"2.46": | ||
"2.65": | ||
folder: all | ||
"2.48": | ||
"2.62": | ||
folder: all | ||
"2.50": | ||
"2.58": | ||
folder: all | ||
"2.57": | ||
folder: all | ||
"2.58": | ||
"2.50": | ||
folder: all | ||
"2.62": | ||
"2.48": | ||
folder: all | ||
"2.65": | ||
"2.46": | ||
folder: all | ||
"2.66": | ||
"2.45": | ||
folder: all |