修改cmake脚本

This commit is contained in:
xiongziliang 2017-10-13 15:23:37 +08:00
parent 73c4740453
commit 556552d224
2 changed files with 12 additions and 4 deletions

View File

@ -87,7 +87,7 @@ endif(FAAC_FOUND)
find_package(ZLTOOLKIT QUIET) find_package(ZLTOOLKIT QUIET)
if(ZLTOOLKIT_FOUND) if(ZLTOOLKIT_FOUND)
message(STATUS "找到ZLToolKit库:\"${ZLTOOLKIT_INCLUDE_DIR}\"") message(STATUS "找到ZLToolKit库:\"${ZLTOOLKIT_INCLUDE_DIR}\"")
include_directories(${ZLTOOLKIT_INCLUDE_DIR}/ZLToolKit) include_directories(${ZLTOOLKIT_INCLUDE_DIR})
list(APPEND LINK_LIB_LIST ${ZLTOOLKIT_LIBRARIES}) list(APPEND LINK_LIB_LIST ${ZLTOOLKIT_LIBRARIES})
endif(ZLTOOLKIT_FOUND) endif(ZLTOOLKIT_FOUND)

View File

@ -1,10 +1,18 @@
find_path(ZLTOOLKIT_INCLUDE_DIR find_path(ZLTOOLKIT_INCLUDE_DIR
NAMES ZLToolKit/Network/Socket.h NAMES Network/Socket.h
PATHS $ENV{HOME}/ZLToolKit/include) PATHS
${PROJECT_SOURCE_DIR}/../ZLToolKit/build/include
$ENV{HOME}/ZLToolKit/include/ZLToolKit)
message(STATUS "${ZLTOOLKIT_INCLUDE_DIR}")
find_library(ZLTOOLKIT_LIBRARY find_library(ZLTOOLKIT_LIBRARY
NAMES ZLToolKit NAMES ZLToolKit
PATHS $ENV{HOME}/ZLToolKit/lib) PATHS
${PROJECT_SOURCE_DIR}/../ZLToolKit/build/lib
$ENV{HOME}/ZLToolKit/lib)
message(STATUS "${ZLTOOLKIT_LIBRARY}")
set(ZLTOOLKIT_LIBRARIES ${ZLTOOLKIT_LIBRARY}) set(ZLTOOLKIT_LIBRARIES ${ZLTOOLKIT_LIBRARY})
set(ZLTOOLKIT_INCLUDE_DIRS ${ZLTOOLKIT_INCLUDE_DIR}) set(ZLTOOLKIT_INCLUDE_DIRS ${ZLTOOLKIT_INCLUDE_DIR})