Skip to content

Commit

Permalink
Fix no_moc.cmake file usage with Monolitic build
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Kunichik authored and Oleksandr Kunichik committed Nov 2, 2020
1 parent 861de10 commit ea32174
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmake/faceliftMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,15 @@ endmacro()

macro(_facelift_add_target_start IMPLEMENTATION_TARGET_NAME)

if(ORIGINAL_TARGET_NAME)
set(OUTPUT_PATH ${CMAKE_BINARY_DIR}/facelift_generated/${ORIGINAL_TARGET_NAME})
if(ALIAS_NAME)
set(NO_MOC_PATH ${CMAKE_BINARY_DIR}/facelift_generated/${ALIAS_NAME})
else()
set(OUTPUT_PATH ${CMAKE_BINARY_DIR}/facelift_generated/${TARGET_NAME})
set(NO_MOC_PATH ${CMAKE_BINARY_DIR}/facelift_generated/${TARGET_NAME})
endif()

# set HEADERS_NO_MOC_GENERATED in this include
include("${OUTPUT_PATH}/no_moc.cmake" OPTIONAL)
include("${NO_MOC_PATH}/no_moc.cmake" OPTIONAL)

# set HEADERS_NO_MOC_FROM_FILE in this include (the file is the input parameter)
if(HEADERS_NO_MOC_FILE)
include("${HEADERS_NO_MOC_FILE}" OPTIONAL)
Expand Down Expand Up @@ -581,7 +582,6 @@ function(facelift_add_library TARGET_NAME)

else()

set(ORIGINAL_TARGET_NAME ${TARGET_NAME})
set(TARGET_NAME ${TARGET_NAME}_OBJECTS)
add_library(${ALIAS_NAME} INTERFACE)
target_link_libraries(${ALIAS_NAME} INTERFACE ${TARGET_NAME})
Expand Down

0 comments on commit ea32174

Please sign in to comment.