Reputation: 91
I would need to specify a library directory property for OBJECT target like this:
add_library( ObjTargetName OBJECT "main.cpp" )
set_target_properties( ObjTargetName PROPERTIES STATIC_LIBRARY_FLAGS "/DEF")
It is an OBJECT target, but there is /DEF flag. And because it is OBJECT target type and not SHARED so link_directories does not work for this case. Is there a way how to specify it? I am using cmake 3.13 and VC2017.
Thanks for any hint.
Upvotes: 0
Views: 323
Reputation: 91
set_target_properties( ObjTargetName PROPERTIES STATIC_LIBRARY_OPTIONS "/DEF;/OUT:${IMPLIB_FILE_PATH}")
Upvotes: 1