Search code examples
dllcmakewxwidgets

CMake wxWidgets DLLs


I'm using CMake. My application uses DLL version of wxWidgets. I'm outputing the apllication's exe file to the specific location within the project tree (e.g. project/bin). What is the best way to automate the process of copying 3rd party shared libraries to executable's directory?

Thx


Solution

  • It is quite possible that you could try to automate the creation of bundle using CPack. Same as described for wxArt2D: here

    Also in CMake you can use post-build events like this:

    add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD 
            COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/Graphics/WaterEffect/background.jpg" "${WATER_EFFECT_TEXTURE_PATH}/background.jpg"
        )