DP_S/src - 副本/CMakeLists.txt

32 lines
696 B
CMake
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 声明编译要求cmake最低版本
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
# 配置支持C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -fpic")
#添加头文件目录
include_directories(${PROJECT_SOURCE_DIR}/include)
# 添加库源文件
set(LIB_SOURCE
controller.cc
df_main.cc
)
# 添加动态库关键词为shared
ADD_LIBRARY(hook_shared SHARED ${LIB_SOURCE})
# 指定动态库的输出名称
SET_TARGET_PROPERTIES(hook_shared PROPERTIES OUTPUT_NAME "hook")
# 指定动态库版本, 视需求而定,可不加
# VERSION:动态库版本SOVERSION:API版本
#SET_TARGET_PROPERTIES(hook_shared PROPERTIES VERSION 0.1.1 SOVERSION 0)
# 指定库编译输出目录
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)