-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
67063c7
commit 7fe61ca
Showing
10 changed files
with
159 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
#======================================================= | ||
# ======================================================= | ||
# 支持多线程 | ||
# 对于需要多线程的库,使用以下命令包含连接库: | ||
# target_link_libraries(xxx ${CMAKE_THREAD_PREFER_PTHREAD}) | ||
#======================================================= | ||
if(Need_THREAD) | ||
# ======================================================= | ||
if (Need_THREAD) | ||
find_package(Threads REQUIRED) | ||
if(NOT CMAKE_THREAD_PREFER_PTHREAD) | ||
|
||
if (NOT CMAKE_THREAD_PREFER_PTHREAD) | ||
set(CMAKE_THREAD_PREFER_PTHREAD ${CMAKE_THREAD_LIBS_INIT}) | ||
endif() | ||
endif () | ||
|
||
message(STATUS "thread lib : ${CMAKE_THREAD_PREFER_PTHREAD}") | ||
endif(Need_THREAD) | ||
endif (Need_THREAD) | ||
|
||
if(Need_UNIXEM) | ||
if (Need_UNIXEM) | ||
find_package(Unixem) | ||
|
||
if (NOT UNIXEM_FOUND) | ||
message(FATAL_ERROR "unixem lib not found!") | ||
endif() | ||
endif() | ||
endif () | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,42 @@ | ||
# create by lsm <lsm@skybility.com> | ||
|
||
#====================================== | ||
# vendor info | ||
#====================================== | ||
SET(CPACK_PACKAGE_VENDOR "zlog") | ||
SET(CPACK_PACKAGE_CONTACT "HardySimpson1984@gmail.com") | ||
SET(CPACK_RPM_PACKAGE_LICENSE "Apache License Version 2.0") | ||
|
||
#====================================== | ||
# default install prefix. | ||
#====================================== | ||
SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local") | ||
SET(CPACK_RPM_PACKAGE_GROUP "System Environment/Base") | ||
|
||
#================================= | ||
# set platform. | ||
#================================= | ||
message(STATUS "system process is ${CMAKE_HOST_SYSTEM_PROCESSOR}") | ||
message(STATUS "system process is ${CMAKE_SYSTEM_PROCESSOR}") | ||
|
||
IF (NOT CMAKE_SYSTEM_PROCESSOR) | ||
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR}) | ||
endif() | ||
endif () | ||
|
||
IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|amd64") | ||
IF (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|amd64") | ||
set(CMAKE_SYSTEM_PROCESSOR x86_64) | ||
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64) | ||
SET(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64") | ||
ELSEIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc64|ppc64") | ||
ELSEIF (${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc64|ppc64") | ||
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE powerpc64) | ||
SET(CPACK_RPM_PACKAGE_ARCHITECTURE "ppc64") | ||
ELSEIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc|ppc") | ||
ELSEIF (${CMAKE_SYSTEM_PROCESSOR} MATCHES "powerpc|ppc") | ||
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE powerpc) | ||
SET(CPACK_RPM_PACKAGE_ARCHITECTURE "ppc") | ||
ELSE() | ||
ELSE () | ||
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386) | ||
SET(CPACK_RPM_PACKAGE_ARCHITECTURE i386) | ||
ENDIF() | ||
SET(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") | ||
ENDIF () | ||
|
||
SET(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") | ||
SET(CPACK_TOPLEVEL_TAG "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") | ||
|
||
#====================================== | ||
# generator setting. | ||
#====================================== | ||
SET(CPACK_CMAKE_GENERATOR "Unix Makefiles") | ||
|
||
if (WIN32) | ||
SET(CPACK_GENERATOR "NSIS") | ||
else() | ||
else () | ||
SET(CPACK_GENERATOR "RPM;DEB") | ||
endif() | ||
endif () | ||
|
||
#====================================== | ||
# package. | ||
#====================================== | ||
add_subdirectory(zlog) |
Oops, something went wrong.