smanders / externpro

build external projects with cmake
MIT License
13 stars 12 forks source link

wxcmakeover #197

Closed smanders closed 6 years ago

smanders commented 6 years ago

there is a wxcmake project and repo that we extract into the build/cmake subdirectory of wxWidgets to build wx via cmake on Windows

there have been many improvements to cmake since wxcmake was first developed (or things I just didn't know about) -- along with other changes that could be made to simplify the maintenance of wxcmake -- hence "wxcmakeover"

smanders commented 6 years ago

wxcmakeover items

from http://docs.wxwidgets.org/trunk/page_libs.html image

smanders commented 6 years ago

I believe this issue is complete with the commits referenced above - if not, other commits will also reference this issue...

smanders commented 6 years ago

there's some good wxcmakeover-type work for the wxx project, too...

smanders commented 6 years ago

completed with commits referenced above

smanders commented 6 years ago

errors compiling targets on Windows that depend on wxWidgets, similar to the following:

cannot convert argument from 'const char *' to 'LPCWSTR'
cannot convert argument from 'LPSTR' to 'LPCWSTR'

which makes me immediately think "UNICODE"

and sure enough, in attempting to inherit compile definitions, I'd done the following in base.cmake:

target_compile_definitions(${lib_name} PUBLIC WXBUILDING __WXMSW__ UNICODE _UNICODE

which impacted the wxwidgets31-targets.cmake file:

set_target_properties(wx::base PROPERTIES
  INTERFACE_COMPILE_DEFINITIONS "WXBUILDING;__WXMSW__;UNICODE;_UNICODE"

which meant that projects like Sdbase also errantly had these compile definitions

what I want is for these definitions to be inherited from wxWidgets libraries/targets that depend on wxbase, but only for the build of wxWidgets -- not for projects that use wxWidgets