cmakecompilationfreerdp

How can I compile wfreerdp.dll instead of wfreerdp.exe?


I just compiled freerdp 2.0 for a legacy project we had, and it produced an wfreerdp.exe file, but our legacy project uses wfreerdp.dll instead of the exe version

Anyone knows what flags to give to cmake to make .dll instead?

Not seeing a flag for that in CMakeLists.txt, which is used by freerdp as a script

https://github.com/VeeamSoftware/FreeRDP/blob/master/CMakeLists.txt


Solution

  • You can modify the cmake file to generate a dll instead of the exe. In FreeRDP\client\Windows\CMakeLists.txt you have to change the following line from:

    add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS})
    

    to

    add_library(${MODULE_NAME} SHARED ${${MODULE_PREFIX}_SRCS})
    

    This way wfreerdp.dll will be built.