summarylogtreecommitdiffstats
path: root/cmake-install.patch
blob: d928fdedded5f4f8c9658794a6b226ff0c2b5300 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,3 +32,14 @@
 
 # linking math library
 target_link_libraries(${PROJECT_NAME} PRIVATE m)
+
+# Install rules
+include(GNUInstallDirs) # Provides standard directory variables
+
+install(TARGETS ${PROJECT_NAME}
+    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}  # Installs to <prefix>/bin
+)
+
+install(FILES LICENSE.md
+    DESTINATION ${CMAKE_INSTALL_DATADIR}/licenses/${PROJECT_NAME} # Installs to <prefix>/share/licenses/objcurses
+)