diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2021-05-18 11:42:27 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2021-05-18 11:44:22 +0200 |
commit | 8e7d62f14bd401e4cc8737c06f16e6978b0b9e57 (patch) | |
tree | 94a3352969e287e5ac6040d2d2829e9656f4d492 /src/mock/CMakeLists.txt | |
parent | 52f8abc09b0d97608ba9d5b57ea96c48a1390384 (diff) | |
download | polecat-8e7d62f14bd401e4cc8737c06f16e6978b0b9e57.tar.gz polecat-8e7d62f14bd401e4cc8737c06f16e6978b0b9e57.zip |
improve cmake files, add simple curl mock, clean up on download error
Diffstat (limited to 'src/mock/CMakeLists.txt')
-rw-r--r-- | src/mock/CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mock/CMakeLists.txt b/src/mock/CMakeLists.txt new file mode 100644 index 0000000..c2634d5 --- /dev/null +++ b/src/mock/CMakeLists.txt @@ -0,0 +1,19 @@ +SET(CURL_SOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/libcurl/libcurl.c +) + +add_library(mockcurl STATIC ${CURL_SOURCES}) +target_include_directories(mockcurl PUBLIC ${LIBCURL_INCLUDE_DIRS}) + +set(NAME ${CMAKE_PROJECT_NAME}_mock) +add_executable(${NAME} ${SOURCES}) + +target_link_libraries(${NAME} LINK_PUBLIC ${JSONC_LIBRARIES}) +target_link_libraries(${NAME} LINK_PUBLIC ${LIBARCHIVE_LIBRARIES}) +target_link_libraries(${NAME} LINK_PUBLIC mockcurl) + +target_include_directories(${NAME} PUBLIC ${JSONC_INCLUDE_DIRS}) +target_include_directories(${NAME} PUBLIC ${LIBARCHIVE_INCLUDE_DIRS}) +target_include_directories(${NAME} PUBLIC ${LIBCURL_INCLUDE_DIRS}) + +target_compile_options(${NAME} PUBLIC ${CFLAGS})
\ No newline at end of file |