when build wx as cmake subdirectory the `CMAKE_LIBRARY_OUTPUT_DIRECTORY` does not work

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
tracyma
In need of some credit
In need of some credit
Posts: 5
Joined: Mon Nov 14, 2022 8:25 am

when build wx as cmake subdirectory the `CMAKE_LIBRARY_OUTPUT_DIRECTORY` does not work

Post by tracyma »

i'm trying intergrate wx as cmake sub project, and all my libs' output dir set to `proj/bin/Release` dir:

Code: Select all

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY $<1:${PROJECT_SOURCE_DIR}/bin/$<CONFIG>>)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${PROJECT_SOURCE_DIR}/bin/$<CONFIG>>)
add_subdirectory(mylibA)
add_subdirectory(mylibB)
# wxWidgets
set(wxUSE_EXCEPTIONS OFF CACHE BOOL "" FORCE)
set(wxUSE_STL ON CACHE BOOL "" FORCE)
set(wxUSE_GLCANVAS ON CACHE BOOL "" FORCE)
set(wxUSE_LIBPNG sys CACHE BOOL "" FORCE)
set(wxUSE_LIBJPEG sys CACHE BOOL "" FORCE)
set(wxUSE_WEBVIEW ON CACHE BOOL "" FORCE)
add_subdirectory(wxWidgets)
all my libs has been copy into output dir but wx*.dlls, any idea?

run the exe get wxmsw32u_gl_vc_custom/wxmsw32u_core_vc_custom/wxbase32u_vc_custom.dll not found error.
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 550
Joined: Fri Nov 03, 2006 2:00 pm

Re: when build wx as cmake subdirectory the `CMAKE_LIBRARY_OUTPUT_DIRECTORY` does not work

Post by stahta01 »

Wild guess on my part; but, what cmake version?
Other people posts said that cmake had an issue fixed related to wxWidgets.

Tim S.
Post Reply