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

501 Views Asked by At

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

2

There are 2 best solutions below

0
ptk_g On BEST ANSWER

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.

0
istik On

Change the:

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

in file:

FreeRDP/blob/master/client/Windows/CMakeLists.txt

line: 48, to:

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