Platform-specific code and multiplayer

First time building multiplayer so I want to make sure I cause myself the least pain down the road:

I’m using a Windows library that needs to run on the server, but I have iOS clients. Do I need to fork two separate projects and maintain them separately, or is there a way to tell the server only code and libraries not to include when the iOS client compiles?