diff --git a/CMakeLists.txt b/CMakeLists.txt index a794d4c0..6d7bef1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,7 +87,7 @@ endif(FAAC_FOUND) find_package(ZLTOOLKIT QUIET) if(ZLTOOLKIT_FOUND) message(STATUS "找到ZLToolKit库:\"${ZLTOOLKIT_INCLUDE_DIR}\"") -include_directories(${ZLTOOLKIT_INCLUDE_DIR}/ZLToolKit) +include_directories(${ZLTOOLKIT_INCLUDE_DIR}) list(APPEND LINK_LIB_LIST ${ZLTOOLKIT_LIBRARIES}) endif(ZLTOOLKIT_FOUND) diff --git a/cmake/FindZLTOOLKIT.cmake b/cmake/FindZLTOOLKIT.cmake index 5fcaa4c0..664ae906 100644 --- a/cmake/FindZLTOOLKIT.cmake +++ b/cmake/FindZLTOOLKIT.cmake @@ -1,10 +1,18 @@ find_path(ZLTOOLKIT_INCLUDE_DIR - NAMES ZLToolKit/Network/Socket.h - PATHS $ENV{HOME}/ZLToolKit/include) + NAMES Network/Socket.h + PATHS + ${PROJECT_SOURCE_DIR}/../ZLToolKit/build/include + $ENV{HOME}/ZLToolKit/include/ZLToolKit) + +message(STATUS "${ZLTOOLKIT_INCLUDE_DIR}") find_library(ZLTOOLKIT_LIBRARY 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_INCLUDE_DIRS ${ZLTOOLKIT_INCLUDE_DIR})