From 30d67cbe6c1ecda42cf757c2f0a5daab3a2b4df7 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Thu, 22 Jul 2021 22:50:46 +0200 Subject: reorder linkage --- src/CMakeLists.txt | 2 +- src/mock/CMakeLists.txt | 2 +- src/tar.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 95e6b6b..85743d9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -56,10 +56,10 @@ target_include_directories(${CMAKE_PROJECT_NAME}core PUBLIC ${JSONC_INCLUDE_DIRS target_include_directories(${CMAKE_PROJECT_NAME}core PUBLIC ${LIBARCHIVE_INCLUDE_DIRS}) target_include_directories(${CMAKE_PROJECT_NAME}core PUBLIC ${LIBCURL_INCLUDE_DIRS}) +target_link_libraries(${CMAKE_PROJECT_NAME} LINK_PUBLIC ${CMAKE_PROJECT_NAME}core) target_link_libraries(${CMAKE_PROJECT_NAME} LINK_PUBLIC ${JSONC_LIBRARIES}) target_link_libraries(${CMAKE_PROJECT_NAME} LINK_PUBLIC ${LIBARCHIVE_LIBRARIES}) target_link_libraries(${CMAKE_PROJECT_NAME} LINK_PUBLIC ${LIBCURL_LIBRARIES}) -target_link_libraries(${CMAKE_PROJECT_NAME} LINK_PUBLIC ${CMAKE_PROJECT_NAME}core) target_compile_options(${CMAKE_PROJECT_NAME}core PUBLIC ${CFLAGS}) target_compile_options(${CMAKE_PROJECT_NAME} PUBLIC ${CFLAGS}) diff --git a/src/mock/CMakeLists.txt b/src/mock/CMakeLists.txt index 7f4f471..320e8a9 100644 --- a/src/mock/CMakeLists.txt +++ b/src/mock/CMakeLists.txt @@ -37,9 +37,9 @@ target_include_directories(mock PRIVATE ${WINE_TAR_DIR} ${CMAKE_CURRENT_BINARY_D set(NAME ${CMAKE_PROJECT_NAME}_mock) add_executable(${NAME} ${MAINSOURCES}) +target_link_libraries(${NAME} LINK_PUBLIC ${CMAKE_PROJECT_NAME}core) target_link_libraries(${NAME} LINK_PUBLIC ${JSONC_LIBRARIES}) target_link_libraries(${NAME} LINK_PUBLIC ${LIBARCHIVE_LIBRARIES}) -target_link_libraries(${NAME} LINK_PUBLIC ${CMAKE_PROJECT_NAME}core) target_link_libraries(${NAME} LINK_PUBLIC mock) target_compile_options(${NAME} PUBLIC ${CFLAGS}) diff --git a/src/tar.c b/src/tar.c index f4f29a8..254a995 100644 --- a/src/tar.c +++ b/src/tar.c @@ -107,5 +107,5 @@ void extract(const struct MemoryStruct* tar, const char* outputdir) archive_write_close(ext); archive_write_free(ext); - if (err) (void)chdir(cwd); + if (err) chdir(cwd); } -- cgit v1.2.3