File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 11
11
# */include/sc2api/sc2api/. sc2_api.h is still included via
12
12
# # include <sc2api/sc2_api.h>
13
13
14
+ # If on windows we want to install to the StarCraft II User's Document folder
15
+ # https://github.com/Blizzard/s2client-api/issues/90#issuecomment-325395402
16
+ if (WIN32 AND NOT CYGWIN )
17
+ set (SC2API_OLD_CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} )
18
+ get_filename_component (CMAKE_INSTALL_PREFIX "$ENV{USERPROFILE} /Documents/StarCraft II" ABSOLUTE )
19
+ endif ()
20
+
14
21
# Set up lib, bin, include install destination dirs
15
22
set (
16
23
SC2API_INSTALL_LIB_DIR
36
43
37
44
# Choose our cmake file install dir based on OS
38
45
if (WIN32 AND NOT CYGWIN )
39
- set (DEF_INSTALL_CMAKE_DIR cmake )
46
+ set (DEF_INSTALL_CMAKE_DIR CMake )
40
47
else ()
41
48
set (DEF_INSTALL_CMAKE_DIR lib/cmake/SC2API )
42
49
endif ()
@@ -57,3 +64,8 @@ foreach(p LIB BIN INCLUDE CMAKE)
57
64
set (${var} "${CMAKE_INSTALL_PREFIX} /${${var} }" )
58
65
endif ()
59
66
endforeach ()
67
+
68
+ # Reset CMAKE_INSTALL_PREFIX to not affect super projects who potentially use it...
69
+ if (WIN32 AND NOT CYGWIN )
70
+ set (CMAKE_INSTALL_PREFIX ${OLD_PREFIX} )
71
+ endif ()
You can’t perform that action at this time.
0 commit comments