Skip to content

Commit

Permalink
fixes #44: Version 1.15 Fails to build because [...]
Browse files Browse the repository at this point in the history
	probably fixes wrong dependency especially on MinSizeRel build
	type and supports multilib for vanilla install target
  • Loading branch information
aquaherd committed Jan 1, 2022
1 parent 9d6be06 commit 05a9874
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,15 @@ if (NOT INTLTOOLMERGE)
message(SEND_ERROR "Could not find intltool-merge")
endif()

file(GLOB pos
LIST_DIRECTORIES false
${CMAKE_CURRENT_LIST_DIR}/po/*.po
)
set(POT ${CMAKE_CURRENT_LIST_DIR}/po/${PROJECT_NAME}.pot)

add_custom_command(OUTPUT ${CMAKE_CURRENT_LIST_DIR}/po/${PROJECT_NAME}.pot
add_custom_command(OUTPUT ${POT}
COMMAND cd ${CMAKE_CURRENT_LIST_DIR}/po && ${INTLTOOLUPDATE} -p -g ${PROJECT_NAME}
DEPENDS ${pos}
)

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hamster.desktop
COMMAND ${INTLTOOLMERGE} -d ${PROJECT_SOURCE_DIR}/po ${PROJECT_SOURCE_DIR}/panel-plugin/hamster.desktop.in ${PROJECT_BINARY_DIR}/hamster.desktop
DEPENDS ${PROJECT_SOURCE_DIR}/panel-plugin/hamster.desktop.in
DEPENDS ${PROJECT_SOURCE_DIR}/panel-plugin/hamster.desktop.in translations
)

add_subdirectory(
Expand All @@ -69,12 +65,12 @@ configure_file(
add_custom_target(
data ALL
DEPENDS
${POT}
${PROJECT_BINARY_DIR}/hamster.desktop
${PROJECT_SOURCE_DIR}/po/${PROJECT_NAME}.pot
${PROJECT_BINARY_DIR}/xfce4-popup-hamstermenu
)

install(TARGETS hamster LIBRARY DESTINATION lib/xfce4/panel/plugins/)
install(FILES ${PROJECT_BINARY_DIR}/hamster.desktop DESTINATION share/xfce4/panel/plugins/)
install(PROGRAMS ${PROJECT_BINARY_DIR}/xfce4-popup-hamstermenu DESTINATION bin)
install(TARGETS hamster LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/xfce4/panel/plugins/)
install(FILES ${PROJECT_BINARY_DIR}/hamster.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/xfce4/panel/plugins/)
install(PROGRAMS ${PROJECT_BINARY_DIR}/xfce4-popup-hamstermenu DESTINATION ${CMAKE_INSTALL_BINDIR})

0 comments on commit 05a9874

Please sign in to comment.