Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
nlogozzo committed Dec 5, 2023
1 parent 93216a7 commit 64143f7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,19 @@ find_package(SQLiteCpp REQUIRED)
target_link_libraries(${PROJECT_NAME} PUBLIC ${LIBS})
target_link_libraries(${PROJECT_NAME}-static PUBLIC ${LIBS})
if(LINUX)
set(LIBS-LINUX libsecret::libsecret PkgConfig::glib-2.0 PkgConfig::gio-2.0 PkgConfig::gmodule-2.0 PkgConfig::gobject-2.0 PkgConfig::gthread-2.0)
find_package(PkgConfig REQUIRED)
find_package(libsecret REQUIRED CONFIG)
target_link_libraries(${PROJECT_NAME} PUBLIC libsecret::libsecret)
target_link_libraries(${PROJECT_NAME}-static PUBLIC libsecret::libsecret)
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} PUBLIC PkgConfig::glib-2.0 PkgConfig::gio-2.0 PkgConfig::gmodule-2.0 PkgConfig::gobject-2.0 PkgConfig::gthread-2.0)
target_link_libraries(${PROJECT_NAME}-static PUBLIC PkgConfig::glib-2.0 PkgConfig::gio-2.0 PkgConfig::gmodule-2.0 PkgConfig::gobject-2.0 PkgConfig::gthread-2.0)
pkg_search_module(UUID REQUIRED uuid)
target_include_directories(${PROJECT_NAME} PUBLIC ${UUID_INCLUDE_DIRS})
target_include_directories(${PROJECT_NAME}-static PUBLIC ${UUID_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} PUBLIC ${LIBS-LINUX} ${UUID_LIBRARIES})
target_link_libraries(${PROJECT_NAME}-static PUBLIC ${LIBS-LINUX} ${UUID_LIBRARIES})
endif()

#libaura Install
Expand Down

0 comments on commit 64143f7

Please sign in to comment.