From 6a1a06f1506b88b769955ddc57035cf166f64ef4 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期五, 22 一月 2021 17:59:18 +0800
Subject: [PATCH] update

---
 CMakeLists.txt |   39 +++++++++++----------------------------
 1 files changed, 11 insertions(+), 28 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c4a8bee..00acf78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,35 +7,18 @@
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED True)
 
+# control where the static and shared libraries are built so that on windows
+# we don't need to tinker with the path to run the executable
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
+# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
+
+option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
 
 
-# add the MathFunctions library
-# if(USE_MYMATH)
-#  add_subdirectory(MathFunctions)
-#  list(APPEND EXTRA_LIBS MathFunctions)
-# endif()
-
-# list(APPEND EXTRA_INCLUDES "${PROJECT_SOURCE_DIR}/include/usgcommon")
-# list(APPEND EXTRA_LIBS lib/usgcommon)
+list(APPEND EXTRA_INCLUDES "${PROJECT_SOURCE_DIR}/include/usgcommon")
+list(APPEND EXTRA_LIBS ${PROJECT_SOURCE_DIR}/lib/libusgcommon.a pthread)
 
 add_subdirectory(${PROJECT_SOURCE_DIR}/src)
-# list(APPEND EXTRA_LIBS shm_queue)
-
-
-# target_link_libraries(B_BUS PUBLIC ${EXTRA_LIBS})
-
-# add the binary tree to the search path for include files
-# so that we will find BusConfig.h
-# target_include_directories(B_BUS PUBLIC
-#                            "${PROJECT_BINARY_DIR}"
-#                             ${EXTRA_INCLUDES}
-#                            )
-
-# add the executable
-# add_executable(B_BUS B_BUS.cxx)
-# add the install targets
-# install(TARGETS B_BUS DESTINATION bin)
-# install(FILES "${PROJECT_BINARY_DIR}/BusConfig.h"
-#   DESTINATION include
-#   )
- 
+add_subdirectory(${PROJECT_SOURCE_DIR}/test)
+add_subdirectory(${PROJECT_SOURCE_DIR}/test_net_socket)
\ No newline at end of file

--
Gitblit v1.8.0