<div dir="auto">Hello,<div dir="auto"><br></div><div dir="auto">I couldn't find any solution's for this problem even after posting the question on Reddit/stack overflow, so I am posting it here.</div><div dir="auto"><br></div><div dir="auto">My question is as follows:</div><div dir="auto"><br></div><div dir="auto"><div dir="auto">I have a static library and two target executables, let's call them **libA**, **EXE1**, **EXE2**.</div><div dir="auto"><br></div><div dir="auto">**libA** has pre-processor macros which needs to be enabled or disabled and another static library which needs to be linked or ignored based on the target executable that I am building.</div><div dir="auto"><br></div><div dir="auto">Let's say, if I am building EXE1. Then I need to enable the macros in libA and link another static library to it.</div><div dir="auto"><br></div><div dir="auto">If I am building EXE2, I need to disabled the macros in libA and don't link to another library.</div><div dir="auto"><br></div><div dir="auto">I don't want to create two targets with same source files.</div><div dir="auto"><br></div><div dir="auto">I am confused on how to solve this issue. Please kindly help in solving this issue.</div></div><div dir="auto"><br></div></div>