tastytea
c70414114c
Some checks reported errors
continuous-integration/drone/push Build was killed
And return it. In preparation for a “View database” feature in the WebExtension.
23 lines
890 B
CMake
23 lines
890 B
CMake
set(MOZILLA_NMH_DIR
|
|
"${CMAKE_INSTALL_LIBDIR}/mozilla/native-messaging-hosts" CACHE STRING "")
|
|
set(INSTALL_MOZILLA_NMH_DIR
|
|
"${CMAKE_INSTALL_PREFIX}/${MOZILLA_NMH_DIR}")
|
|
|
|
add_executable(${PROJECT_NAME}_wrapper ${PROJECT_NAME}_wrapper.cpp)
|
|
target_link_libraries(${PROJECT_NAME}_wrapper stdc++fs)
|
|
install(TARGETS ${PROJECT_NAME}_wrapper DESTINATION ${MOZILLA_NMH_DIR})
|
|
|
|
add_custom_command(
|
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.json"
|
|
WORKING_DIRECTORY
|
|
"${CMAKE_SOURCE_DIR}/browser-plugins/webextension/native-wrapper"
|
|
DEPENDS "${PROJECT_NAME}.json"
|
|
COMMAND "./replace_nmh_dir.sh"
|
|
ARGS "${INSTALL_MOZILLA_NMH_DIR}"
|
|
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.json")
|
|
add_custom_target(nmh_replace ALL
|
|
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.json")
|
|
install(
|
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.json
|
|
DESTINATION ${MOZILLA_NMH_DIR})
|