From d1074376fb61ad88e80df8e1bc34c9de2009ae72 Mon Sep 17 00:00:00 2001
From: Alexey Stratulat <alexey.stratulat@demlabs.net>
Date: Mon, 10 Jun 2019 17:21:42 +0700
Subject: [PATCH] PkgConfig search disabled. And also removed the JSON-c
 connection as unnecessary. Added, copying to the binary directory of the file
 main_test.py from the test folder.

---
 CMakeLists.txt | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c0447f34..4f197d5c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,18 +14,11 @@ file(GLOB CORE_HEADERS src/*.h)
 
 set(Python_ADDITIONAL_VERSIONS 3.7)
 find_package (PythonLibs REQUIRED)
-find_package(PkgConfig)
-pkg_check_modules(PC_JSON-C REQUIRED json-c)
+#find_package(PkgConfig)
+#pkg_check_modules(PC_JSON-C REQUIRED json-c)
 include_directories(${PYTHON_INCLUDE_DIR})
 
-#set(CMAKE_C_FLAGS "-fpic")
-#set_property(GLOBAL PROPERTY CMAKE_C_FLAGS "-std=c11 -Wall -Wextra -fpic")
-
-#target_link_libraries(${PROJECT_NAME} dap_core)
-
-#add_executable(${PROJECT_NAME} ${CORE_SRCS} ${CORE_UNIX_SRCS})
 add_library(${PROJECT_NAME} SHARED ${CORE_SRCS} ${CORE_UNIX_SRCS})
-#add_library(${PROJECT_NAME} STATIC ${CORE_SRCS} ${CORE_UNIX_SRCS})
 
 target_link_libraries(${PROJECT_NAME} ${PYTHON_LIBRARIES})
 
@@ -39,8 +32,13 @@ target_link_libraries(${PROJECT_NAME} dap_core dap_crypto)
 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/libdapConnector.py
         DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
 
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test/main_test.py
+            DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
+
 if(BUILD_DAP_TESTS)
+    file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test/main_test.py
+            DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
     enable_testing()
-    add_subdirectory(test)
+    #add_subdirectory(test)
 endif()
 
-- 
GitLab