Skip to content

Commit

Permalink
Fix FTBFS on reconfigure
Browse files Browse the repository at this point in the history
The cause is a package namespace collision.
The GLIB namespace is already taken by find_package(GLIB ...).
Easy solution: Rename the pkg_check_modules(GLIB ... ) namespace.

Closes #73.
  • Loading branch information
luis-pereira authored and agaida committed Feb 22, 2019
1 parent 10d1f86 commit a29bcd6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -35,7 +35,7 @@ find_package(GLIB ${GLIB_MINIMUM_VERSION} REQUIRED)
find_package(PkgConfig REQUIRED)

pkg_check_modules(
GLIB
GLIB_JSON
json-glib-1.0 # what's this?
)

Expand Down
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Expand Up @@ -3,6 +3,7 @@ add_subdirectory(core)
include_directories(
core
${GLIB_INCLUDE_DIRS}
${GLIB_JSON_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
Expand Down Expand Up @@ -66,7 +67,8 @@ target_link_libraries(lxqt-archiver
Qt5::DBus
fm-qt
lxqt-archiver-core
${GLIB_LDFLAGS}
${GLIB_LIBRARIES}
${GLIB_JSON_LDFLAGS}
)

install(TARGETS
Expand Down
7 changes: 5 additions & 2 deletions src/core/CMakeLists.txt
@@ -1,5 +1,6 @@
include_directories(
${GLIB_INCLUDE_DIRS}
${GLIB_JSON_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}
)

Expand Down Expand Up @@ -46,14 +47,16 @@ add_library(lxqt-archiver-core STATIC
)

target_link_libraries(lxqt-archiver-core
${GLIB_LDFLAGS}
${GLIB_LIBRARIES}
${GLIB_JSON_LDFLAGS}
)

add_executable(rpm2cpio
commands/rpm2cpio.c
)
target_link_libraries(rpm2cpio
${GLIB_LDFLAGS}
${GLIB_LIBRARIES}
${GLIB_JSON_LDFLAGS}
)
install(TARGETS
rpm2cpio
Expand Down

0 comments on commit a29bcd6

Please sign in to comment.