You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- cmake_minimum_required(VERSION 3.13)
- project(YitIdGen)
- set(CMAKE_C_STANDARD 11)
-
- #set(CMAKE_BUILD_TYPE DEBUG)
- #set(CMAKE_BUILD_TYPE RELEASE)
-
- aux_source_directory(. DIR_SRCS)
- add_subdirectory(idgen)
-
- #编译动态库
- set(LIB_SRC YitIdHelper.h YitIdHelper.c)
- add_library(YitIdGenLib SHARED ${LIB_SRC})
- target_link_libraries(YitIdGenLib idgen)
- set_target_properties(YitIdGenLib PROPERTIES
- LINKER_LANGUAGE C
- OUTPUT_NAME "yitidgenc"
- PREFIX "")
-
- # 编译执行文件
- # set(LIB_SRC YitIdHelper.h YitIdHelper.c)
- add_library(YitIdHelper ${LIB_SRC})
- add_executable(YitIdGen main.c)
- target_link_libraries(YitIdGen YitIdHelper pthread)
- target_link_libraries(YitIdGen idgen pthread)
-
|