summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
author彭宣正 <[email protected]>2021-12-20 15:37:00 +0800
committer彭宣正 <[email protected]>2021-12-20 15:37:00 +0800
commit3488e3aba8008b0a3073a00e01332d872580779a (patch)
tree2c816b82f35a95716dd0317c6a21307b6281f339 /src/CMakeLists.txt
parent0dbf2e6957168a9f271881adf565918143f96586 (diff)
🧪 test(gtest. CI): 增加gtest用例,增加CPPCHECK,删除生成的可执行文件
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3dd3177..c809e9c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -7,16 +7,16 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -shared -fPIC")
SET(CMAKE_CXX_DEBUG_FLAGS "${CMAKE_CXX_DEBUG_FLAGS} -DTSG_LUA_DEBUG")
SET(CMAKE_BUILD_TYPE "Release")
+option(TSG_LUA_DEBUG "If enabled, the SDK will be print debuginfo." OFF)
+
+if (TSG_LUA_DEBUG)
+ add_definitions(-DTSG_LUA_DEBUG)
+endif()
+
+
add_library(${lib_name}_shared SHARED ${DIR_LIB_SRCS})
target_link_libraries(${lib_name}_shared dl luajit2-static)
set_target_properties(${lib_name}_shared PROPERTIES OUTPUT_NAME ${lib_name})
-#set_target_properties(${lib_name} PROPERTIES PREFIX "")
-#set_target_properties(${lib_name}_shared PROPERTIES OUTPUT_NAME ${lib_name})
-
-#add_library(${lib_name}_static ${DIR_LIB_SRCS})
-#add_dependencies(${lib_name}_static luajit2-static)
-#set_target_properties(${lib_name}_static PROPERTIES PREFIX "")
install(TARGETS ${lib_name}_shared LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib COMPONENT LIBRARIES)
-#install(TARGETS ${lib_name}_static LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib COMPONENT LIBRARY)