Skip to content

Commit

Permalink
build(deps): update PFL.cmake
Browse files Browse the repository at this point in the history
Signed-off-by: black-desk <me@black-desk.cn>
  • Loading branch information
black-desk committed Oct 11, 2023
1 parent ede2f42 commit 1bd6fa1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmake/PFL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ function(pfl_add_libraries)
set(PFL_MESSAGE_INDENT "${PFL_MESSAGE_INDENT} ")

cmake_path(GET CMAKE_CURRENT_SOURCE_DIR FILENAME TARGET_DIR_NAME)

if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
set(TARGET_DIR_NAME ${PROJECT_NAME})
endif()

string(REPLACE " " "_" TARGET_NAME "${TARGET_DIR_NAME}")

if(PFL_PREFIX)
Expand Down Expand Up @@ -121,6 +126,10 @@ function(pfl_add_library)

cmake_path(GET CMAKE_CURRENT_SOURCE_DIR FILENAME TARGET_DIR_NAME)

if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
set(TARGET_DIR_NAME ${PROJECT_NAME})
endif()

string(REPLACE " " "_" TARGET_NAME "${TARGET_DIR_NAME}")

string(REPLACE "::" "__" TARGET_PREFIX "${PFL_PREFIX}")
Expand Down

0 comments on commit 1bd6fa1

Please sign in to comment.