Codebase list nautilus-admin / upstream/1.1.8 CMakeLists.txt
upstream/1.1.8

Tree @upstream/1.1.8 (Download .tar.gz)

CMakeLists.txt @upstream/1.1.8raw · history · blame

cmake_minimum_required(VERSION 2.6)
project(NautilusAdmin NONE)
find_package(Gettext REQUIRED)

# Configurable paths
set(NAUTILUS_PATH "/usr/bin/nautilus" CACHE FILEPATH "nautilus program path.")
set(GEDIT_PATH "/usr/bin/gedit" CACHE FILEPATH "gedit program path.")

# Configure files
configure_file(extension/nautilus-admin.py
               extension/nautilus-admin.py)

# Update and compile the translations
file(GLOB PO_FILES "po/*.po")
gettext_create_translations(po/nautilus-admin.pot ALL ${PO_FILES})

# Install target
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/extension/nautilus-admin.py"
        DESTINATION /usr/share/nautilus-python/extensions)

# Uninstall target
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
               "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake" IMMEDIATE @ONLY)
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND}
                  -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake)