Skip to content

Commit 7d89e7e

Browse files
committed
Refactor repeated string to variable.
1 parent 2066564 commit 7d89e7e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmake/ystdlib-helpers.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,11 @@ function(install_library)
209209
set(ARG_CONFIG_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
210210
endif()
211211

212+
set(EXPORT_NAME "${ARG_NAME}-target")
212213
install(
213214
TARGETS
214215
"${ARG_NAME}"
215-
EXPORT "${ARG_NAME}-target"
216+
EXPORT "${EXPORT_NAME}"
216217
LIBRARY
217218
ARCHIVE
218219
RUNTIME
@@ -221,7 +222,7 @@ function(install_library)
221222
)
222223

223224
install(
224-
EXPORT "${ARG_NAME}-target"
225+
EXPORT "${EXPORT_NAME}"
225226
DESTINATION ${ARG_CONFIG_DEST_DIR}
226227
NAMESPACE "${ARG_NAMESPACE}::"
227228
COMPONENT "${ARG_NAME}"

0 commit comments

Comments
 (0)