dll artifacts - Runtime or Library Output

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

dll artifacts - Runtime or Library Output

Kerstin Keller
On Windows, a .dll is considered by CMake to be a "RUNTIME" Output artifact if it was added with the `add_library(my_liib SHARED my_lib.cpp), however if it was added with the MODULE keyword, it is considered to be a "LIBRARY" output, as stated in the documentation https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#runtime-output-artifacts

I just discovered this behavior and it seems quite unintuitive to me.
If I dynamically load a library with LoadLibrary without specying an absolute path, Windows will still use the default search path logic for Windows, which means first same directory as the executable loading the module, e.g. the RUNTIME output directory.

Can you please elaborate on this?   

Thanks, Kerstin


Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe: