aboutsummaryrefslogtreecommitdiff
path: root/src/mock/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/mock/CMakeLists.txt')
-rw-r--r--src/mock/CMakeLists.txt19
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