File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,20 @@ get_filename_component(EXECUTABLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
9
9
10
10
project (${EXECUTABLE_NAME} )
11
11
12
+ # Set installation settings
13
+ # -------------------------
14
+
15
+ # When invoking cmake install, install binaries to build directory
16
+ set (CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR} /install/" CACHE PATH
17
+ "Default install path" FORCE)
18
+
19
+ # Set RPATH so that Linux looks for the libraries in the same folder. This needs
20
+ # to go before any add_executable() or add_library()
21
+ set (CMAKE_INSTALL_RPATH "$ORIGIN" )
22
+
23
+ # Declare binary
24
+ # --------------
25
+
12
26
add_executable (${EXECUTABLE_NAME} )
13
27
14
28
# Link with libugba
@@ -65,3 +79,8 @@ target_include_directories(${EXECUTABLE_NAME} PRIVATE
65
79
source
66
80
built_assets
67
81
)
82
+
83
+ # Define install targets
84
+ # ----------------------
85
+
86
+ install (TARGETS ${EXECUTABLE_NAME} libugba DESTINATION .)
You can’t perform that action at this time.
0 commit comments