I tried this code to link *.lib
files and *.obj
files to my dependency.
SET(EXT_LIBS iphlpapi.lib json_writer.obj json_value.obj)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SUFFIX "/link .obj")
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${EXT_LIBS} )
The code is working for only *.lib
files.
And for the *.obj
files it ".lib"
is automatically attached.
As a result,
iphlpapi.lib
json_writer.obj.lib
json_value.obj.lib
But I want the result of
iphlpapi.lib
json_writer.obj
json_value.obj
How to disable automatic attaching ".lib" when I link *.obj
files in cmake?