Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceIm committed Oct 24, 2022
1 parent a7fcbe1 commit 8edeea7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
1 change: 0 additions & 1 deletion recipes/glib/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class GLibConan(ConanFile):
short_paths = True

def export_sources(self):
copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder)
export_conandata_patches(self)

def config_options(self):
Expand Down
18 changes: 3 additions & 15 deletions recipes/glib/all/test_v1_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
cmake_minimum_required(VERSION 3.1)
project(test_package LANGUAGES C)
project(test_package)

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

add_executable(${PROJECT_NAME} ../test_package/test_package.c)

if (WIN32)
find_package(glib CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE glib::glib-2.0 glib::gio-2.0 glib::gmodule-2.0 glib::gobject-2.0 glib::gthread-2.0)
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(glib-2.0 REQUIRED IMPORTED_TARGET glib-2.0)
pkg_check_modules(gio-2.0 REQUIRED IMPORTED_TARGET gio-2.0)
pkg_check_modules(gmodule-2.0 REQUIRED IMPORTED_TARGET gmodule-2.0)
pkg_check_modules(gobject-2.0 REQUIRED IMPORTED_TARGET gobject-2.0)
pkg_check_modules(gthread-2.0 REQUIRED IMPORTED_TARGET gthread-2.0)
target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::glib-2.0 PkgConfig::gio-2.0 PkgConfig::gmodule-2.0 PkgConfig::gobject-2.0 PkgConfig::gthread-2.0)
endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package
${CMAKE_CURRENT_BINARY_DIR}/test_package)

0 comments on commit 8edeea7

Please sign in to comment.