File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,16 @@ function(MakeCPIO output_name input_files)
4444 set (archive_symbol ${MAKE_CPIO_CPIO_SYMBOL} )
4545 endif ()
4646
47- set (cpio_archive "${CMAKE_CURRENT_BINARY_DIR} /archive.${output_name} .cpio" )
47+ get_filename_component (cpio_lib_name "${output_name} " NAME )
48+ get_filename_component (cpio_lib_dir "${output_name} " DIRECTORY )
49+ if (NOT cpio_lib_dir)
50+ set (cpio_lib_dir "${CMAKE_CURRENT_BINARY_DIR} " )
51+ else ()
52+ set (cpio_lib_dir "${CMAKE_CURRENT_BINARY_DIR} /${cpio_lib_dir} " )
53+ endif ()
54+
55+ # intermediate files
56+ set (cpio_archive "${cpio_lib_dir} /${cpio_lib_name} .cpio" )
4857
4958 # Create a script that prepares CPIO archive contents in a tmp folder and
5059 # then builds the archive. We have to pass the files to cpio in the same
@@ -56,7 +65,7 @@ function(MakeCPIO output_name input_files)
5665 # epoch (ie 0). The cpio parameter "--owner=+0:+0" sets user and group
5766 # values to 0:0.
5867 CheckCPIOArgument (cpio_reproducible_flag "--reproducible" )
59- set (cpio_archive_creator "${CMAKE_CURRENT_BINARY_DIR } /${output_name } .sh" )
68+ set (cpio_archive_creator "${cpio_lib_dir } /${cpio_lib_name } .sh" )
6069 file (
6170 WRITE
6271 "${cpio_archive_creator} "
@@ -75,7 +84,7 @@ function(MakeCPIO output_name input_files)
7584
7685 # Create a "program" that makes the compiler generate and object file that
7786 # contains the cpio archive.
78- set (cpio_archive_s "${CMAKE_CURRENT_BINARY_DIR } /${output_name } .S" )
87+ set (cpio_archive_s "${cpio_lib_dir } /${cpio_lib_name } .S" )
7988 file (
8089 WRITE
8190 "${cpio_archive_s} "
You can’t perform that action at this time.
0 commit comments