forked from weaselab/weaseljson
Fix make build by depending on target name instead of TARGET_OBJECTS in custom command
The Makefile generator does not create a rule for individual object files when $<TARGET_OBJECTS:...> is used in DEPENDS of add_custom_command. Depending on the target name instead establishes a proper target-level dependency.
This commit is contained in:
+1
-1
@@ -119,7 +119,7 @@ add_custom_command(
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.o
|
||||
COMMAND ${LD_EXE} -r $<TARGET_OBJECTS:${PROJECT_NAME}-object> -o
|
||||
${CMAKE_BINARY_DIR}/${PROJECT_NAME}.o
|
||||
DEPENDS $<TARGET_OBJECTS:${PROJECT_NAME}-object>
|
||||
DEPENDS ${PROJECT_NAME}-object
|
||||
COMMAND_EXPAND_LISTS)
|
||||
|
||||
add_library(${PROJECT_NAME} SHARED ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.o)
|
||||
|
||||
Reference in New Issue
Block a user