Skip to content

Commit

Permalink
feat(cmake): add macro ZLMediaKit_PARENT_DIR / ZLMediaKit_PARENT_DIR_…
Browse files Browse the repository at this point in the history
…LENGTH
  • Loading branch information
johzzy committed Nov 22, 2024
1 parent 8868320 commit 44747ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ set(CMAKE_VERBOSE_MAKEFILE ON CACHE INTERNAL "" FORCE)
# TODO: include 当前目录会导致 server 编译出错, 待排除
set(CMAKE_INCLUDE_CURRENT_DIR OFF)

get_filename_component(ZLMediaKit_PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
string(LENGTH "${ZLMediaKit_PARENT_DIR}" ZLMediaKit_PREFIX_LENGTH)
add_definitions(-DZLMediaKit_PARENT_DIR=\"${ZLMediaKit_PARENT_DIR}\")
add_definitions(-DZLMediaKit_PARENT_DIR_LENGTH=${ZLMediaKit_PREFIX_LENGTH})

# 安装路径
# Install path
if(NOT CMAKE_INSTALL_PREFIX)
Expand Down

0 comments on commit 44747ce

Please sign in to comment.