pavelliavonau/cmakeconverter

Wrong and empty variables at TargetName section in generated CMakeLists.txt

Closed this issue · 4 comments

bigla commented

The project I work on has a vcxproj file where
<RootNamespace>ProjName</RootNamespace>
and
<TargetName>FOO</TargetName>
and
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>

The conversion then yields:

string(CONCAT TARGET_NAME
          $<$<CONFIG:Debug>:${OUT_DIR}${TARGET_NAME}$ENV{TargetExt}>
        $<$<CONFIG:Release>:${OUT_DIR}${TARGET_NAME}$ENV{TargetExt}>
        $<$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:Release>>>:${PROJECT_NAME}>
...
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${TARGET_NAME})

Which creates the following error in CMake:

CMake Error at total/ProjName/CMakeLists.txt:31 (add_executable):
Target 'ProjName' OUTPUT_NAME depends on itself.

is this behavior expected?

(BTW. I hope I am not going on anyone's nerves, I am still new to github as well as testing/contributing to open-source projects)

bigla commented

<TargetName> is a user defined property, sure you cannot handle all of them. I closed it.

@bigla , it may be the bug. Must be checked.

could you please elaborate on " is a user defined property, sure you cannot handle all of them"

Thnaks

bigla commented

could you please elaborate on " is a user defined property, sure you cannot handle all of them"

I thought, that the tag <TargetName> is something my colleagues added to the .vcxproj files by using some vodoo but now, I am not sure again.