diff options
Diffstat (limited to 'src/mock/wine/CMakeLists.txt')
-rw-r--r-- | src/mock/wine/CMakeLists.txt | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/mock/wine/CMakeLists.txt b/src/mock/wine/CMakeLists.txt index 8275b27..3418089 100644 --- a/src/mock/wine/CMakeLists.txt +++ b/src/mock/wine/CMakeLists.txt @@ -5,31 +5,32 @@ SET(WINE_SOURCES set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mock/bin") file(MAKE_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") -set(WINE_TAR_DIR "${CMAKE_CURRENT_BINARY_DIR}") -set(WINE_TAR_DIR "${WINE_TAR_DIR}" PARENT_SCOPE) +set(WINE_MOCK_ARCHIVE_DIR "${CMAKE_CURRENT_BINARY_DIR}") +set(WINE_MOCK_ARCHIVE_DIR "${WINE_MOCK_ARCHIVE_DIR}" PARENT_SCOPE) -add_executable(wine ${WINE_SOURCES}) -target_compile_options(wine PUBLIC ${CFLAGS}) +add_executable(wine_mock ${WINE_SOURCES}) +set_target_properties(wine_mock PROPERTIES OUTPUT_NAME "wine") +target_compile_options(wine_mock PUBLIC ${CFLAGS}) -set(WINE_TAR_FILE_NAME "wine-mock.tar.xz") -set(WINE_TAR_FILE "${WINE_TAR_DIR}/${WINE_TAR_FILE_NAME}") -string(REGEX REPLACE "\\.| |-" "_" WINE_TAR_FILE_NAME ${WINE_TAR_FILE_NAME}) -set(WINE_TAR_OUT "${WINE_TAR_DIR}/${WINE_TAR_FILE_NAME}") -set(WINE_TAR_OUT "${WINE_TAR_OUT}" PARENT_SCOPE) +set(WINE_MOCK_ARCHIVE_FILE_NAME "wine-mock.tar.xz") +set(WINE_MOCK_ARCHIVE_FILE "${WINE_MOCK_ARCHIVE_DIR}/${WINE_MOCK_ARCHIVE_FILE_NAME}") +string(REGEX REPLACE "\\.| |-" "_" WINE_MOCK_ARCHIVE_FILE_NAME ${WINE_MOCK_ARCHIVE_FILE_NAME}) +set(WINE_MOCK_ARCHIVE_OUT "${WINE_MOCK_ARCHIVE_DIR}/${WINE_MOCK_ARCHIVE_FILE_NAME}") +set(WINE_MOCK_ARCHIVE_OUT "${WINE_MOCK_ARCHIVE_OUT}" PARENT_SCOPE) add_custom_command( - OUTPUT ${WINE_TAR_FILE} + OUTPUT ${WINE_MOCK_ARCHIVE_FILE} COMMAND - ${CMAKE_COMMAND} -E tar "cfv" "${WINE_TAR_FILE}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" - DEPENDS wine + ${CMAKE_COMMAND} -E tar "cfv" "${WINE_MOCK_ARCHIVE_FILE}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" + DEPENDS wine_mock ) add_custom_command( - OUTPUT ${WINE_TAR_OUT}.c ${WINE_TAR_OUT}.h + OUTPUT ${WINE_MOCK_ARCHIVE_OUT}.c ${WINE_MOCK_ARCHIVE_OUT}.h COMMAND ${CMAKE_COMMAND} - "-Dbin_in=${WINE_TAR_FILE}" + "-Dbin_in=${WINE_MOCK_ARCHIVE_FILE}" -P ${CMAKE_SOURCE_DIR}/cmake/FileEmbed.cmake - DEPENDS ${WINE_TAR_FILE} + DEPENDS ${WINE_MOCK_ARCHIVE_FILE} ) -add_custom_target(wine_tar ALL DEPENDS ${WINE_TAR_OUT}.c ${WINE_TAR_OUT}.h)
\ No newline at end of file +add_custom_target(wine_mock_archive ALL DEPENDS ${WINE_MOCK_ARCHIVE_OUT}.c ${WINE_MOCK_ARCHIVE_OUT}.h)
\ No newline at end of file |