-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added install and .deb build targets
- Loading branch information
Simon Cahill
committed
Oct 14, 2022
1 parent
5dcd499
commit ea4e398
Showing
1 changed file
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,4 +57,28 @@ target_link_libraries( | |
|
||
fmt | ||
nlohmann_json | ||
) | ||
) | ||
|
||
### | ||
# Install and Remove targets and their configs go here | ||
### | ||
set(fail2abuseipdb_INSTALL_DIR "/usr/local/bin") | ||
|
||
install( | ||
TARGETS ${PROJECT_NAME} | ||
RUNTIME DESTINATION ${fail2abuseipdb_INSTALL_DIR} | ||
) | ||
|
||
add_custom_target("uninstall" COMMENT "Uninstall fail2abuseipdb") | ||
add_custom_command( | ||
TARGET "uninstall" | ||
POST_BUILD | ||
COMMENT "Uninstall fail2abuseipdb from the current system" | ||
COMMAND xargs rm -Rfv < install_manifest.txt || echo "Nothing to be removed from system!" | ||
) | ||
|
||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) | ||
set(CPACK_PACKAGE_CONTACT "Simon Cahill <[email protected]>") | ||
set(CPACK_PACKAGE_VENDOR "Simon Cahill") | ||
set(CPACK_GENERATOR DEB) | ||
include(CPack) |