Skip to content

Commit

Permalink
libfreenect2: Test package update.
Browse files Browse the repository at this point in the history
  • Loading branch information
sh0 committed Oct 14, 2021
1 parent 189c3eb commit 6f83c63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions recipes/libfreenect2/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ cmake_minimum_required(VERSION 3.1)
project(test_package LANGUAGES CXX)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
conan_basic_setup(TARGETS)

find_package(freenect2 REQUIRED CONFIG)

This comment has been minimized.

Copy link
@madebr

madebr Oct 14, 2021

Contributor

Doesn't config provide these variables?
If so, then we might need to provide a custom script does the following (or something similar):

set(freenect2_LIBRARIES freenect2::freenect2)

The possibility that some script does both find_package + find_patch(kinect2.h) is small.

find_package(freenect2 REQUIRED)

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} freenect2::freenect2)
target_link_libraries(${PROJECT_NAME} PRIVATE ${freenect2_LIBRARIES})
target_include_directories(${PROJECT_NAME} PRIVATE ${freenect2_INCLUDE_DIRS})
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
2 changes: 1 addition & 1 deletion recipes/libfreenect2/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake", "cmake_find_package_multi"
generators = "cmake", "cmake_find_package"

def build(self):
cmake = CMake(self)
Expand Down

0 comments on commit 6f83c63

Please sign in to comment.