lichao
2021-05-19 981ca0fa022524fd04af988bc798f2d697d31548
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
file(GLOB sources "./*.cpp" "../log/*.cpp")
 
set(Target bhome_shmq)
set(TargetStatic bhome_shmq_static)
 
set(CMAKE_SHARED_LINKER_FLAGS  ${CMAKE_SHARED_LINKER_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exported_symbols")
include_directories(../log)
add_library(${Target} SHARED ${sources})
add_library(${TargetStatic} STATIC ${sources})
 
set(LogLibs "boost_log;boost_log_setup;boost_thread;boost_filesystem")
 
target_link_libraries(${Target} bhome_msg ${LogLibs} pthread rt)
target_link_libraries(${TargetStatic} bhome_msg ${LogLibs} pthread rt)