File tree 2 files changed +23
-7
lines changed
2 files changed +23
-7
lines changed Original file line number Diff line number Diff line change 11
11
function (generateAxl target )
12
12
13
13
set (options INSTALL_GENERATED_FILES NO_COPY NO_ARCANE NO_MESH)
14
- set (oneValueArgs AXL_OPTION_GENERATION_MODE NAMESPACE)
14
+ set (oneValueArgs AXL_OPTION_GENERATION_MODE NAMESPACE USER_INSTALL_PREFIX )
15
15
set (multiValueArgs)
16
16
17
17
cmake_parse_arguments (ARGS "${options} " "${oneValueArgs} " "${multiValueArgs} " ${ARGN} )
18
18
19
- set (axl_path ${CMAKE_BINARY_DIR} /${PROJECT_NAME} /axl)
19
+ if (ARGS_USER_INSTALL_PREFIX)
20
+ set (axl_path ${CMAKE_BINARY_DIR} /${ARGS_USER_INSTALL_PREFIX} /axl)
21
+ else ()
22
+ set (axl_path ${CMAKE_BINARY_DIR} /${PROJECT_NAME} /axl)
23
+ endif ()
20
24
21
25
if (NOT EXISTS ${axl_path} )
22
26
file (MAKE_DIRECTORY ${axl_path} )
@@ -125,7 +129,11 @@ function(generateAxl target)
125
129
set_property (GLOBAL APPEND PROPERTY AXL_DB ${file} )
126
130
127
131
if (ARGS_INSTALL_GENERATED_FILES)
128
- install (FILES ${generated_files} DESTINATION include /${PROJECT_NAME} /axl)
132
+ if (ARGS_USER_INSTALL_PREFIX)
133
+ install (FILES ${generated_files} DESTINATION include /${ARGS_USER_INSTALL_PREFIX} /axl)
134
+ else ()
135
+ install (FILES ${generated_files} DESTINATION include /${PROJECT_NAME} /axl)
136
+ endif ()
129
137
endif ()
130
138
131
139
endforeach ()
Original file line number Diff line number Diff line change @@ -14,13 +14,17 @@ cmake_policy(SET CMP0079 NEW)
14
14
# 'axlstar_generate_from_axl'
15
15
function (generateAxl target )
16
16
17
- set (options INSTALL_GENERATED_FILES NO_COPY NO_ARCANE NO_MESH)
18
- set (oneValueArgs AXL_OPTION_GENERATION_MODE NAMESPACE)
17
+ set (options INSTALL_GENERATED_FILES NO_COPY NO_ARCANE NO_MESH USER_INSTALL_PREFIX )
18
+ set (oneValueArgs AXL_OPTION_GENERATION_MODE NAMESPACE )
19
19
set (multiValueArgs)
20
20
21
21
cmake_parse_arguments (ARGS "${options} " "${oneValueArgs} " "${multiValueArgs} " ${ARGN} )
22
22
23
- set (axl_path ${CMAKE_BINARY_DIR} /${PROJECT_NAME} /axl)
23
+ if (ARGS_USER_INSTALL_PREFIX)
24
+ set (axl_path ${CMAKE_BINARY_DIR} /${ARGS_USER_INSTALL_PREFIX} /axl)
25
+ else ()
26
+ set (axl_path ${CMAKE_BINARY_DIR} /${PROJECT_NAME} /axl)
27
+ endif ()
24
28
25
29
if (NOT EXISTS ${axl_path} )
26
30
file (MAKE_DIRECTORY ${axl_path} )
@@ -134,7 +138,11 @@ function(generateAxl target)
134
138
set_property (GLOBAL APPEND PROPERTY AXL_DB ${file} )
135
139
136
140
if (ARGS_INSTALL_GENERATED_FILES)
137
- install (FILES ${generated_files} DESTINATION include /${PROJECT_NAME} /axl)
141
+ if (ARGS_USER_INSTALL_PREFIX)
142
+ install (FILES ${generated_files} DESTINATION include /${ARGS_USER_INSTALL_PREFIX} /axl)
143
+ else ()
144
+ install (FILES ${generated_files} DESTINATION include /${PROJECT_NAME} /axl)
145
+ endif ()
138
146
endif ()
139
147
140
148
endforeach ()
You can’t perform that action at this time.
0 commit comments