Issue with cmake 3.14.0+ - https://github.com/OpenCPN/OpenCPN/issues/1329#issuecomment-477118399 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -335,9 +335,9 @@ ENDIF() IF((_wx_selected_config MATCHES "qt-armv7")) -SET(wxWidgets_USE_LIBS base core xml html adv aui) +SET(wxWidgets_FIND_COMPONENTS base core xml html adv aui) ELSE() - SET(wxWidgets_USE_LIBS net xml html adv aui core base) + SET(wxWidgets_FIND_COMPONENTS net xml html adv aui core base) ENDIF() OPTION (USE_GL "Enable OpenGL support" ON) @@ -354,7 +354,7 @@ SET(OPENGLES_FOUND "YES") SET(OPENGL_FOUND "YES") - SET(wxWidgets_USE_LIBS ${wxWidgets_USE_LIBS} gl ) + SET(wxWidgets_FIND_COMPONENTS ${wxWidgets_FIND_COMPONENTS} gl ) add_subdirectory(src/glshim) SET(OPENGL_LIBRARIES "GL_static" "EGL" "X11" "drm" ) @@ -373,7 +373,7 @@ SET(OPENGLES_FOUND "YES") SET(OPENGL_FOUND "YES") - SET(wxWidgets_USE_LIBS ${wxWidgets_USE_LIBS} gl ) + SET(wxWidgets_FIND_COMPONENTS ${wxWidgets_FIND_COMPONENTS} gl ) add_subdirectory(src/glshim) ENDIF(QT_ANDROID) @@ -389,7 +389,7 @@ IF(OPENGL_FOUND) - SET(wxWidgets_USE_LIBS gl ${wxWidgets_USE_LIBS} ) + SET(wxWidgets_FIND_COMPONENTS gl ${wxWidgets_FIND_COMPONENTS} ) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) MESSAGE (STATUS "Found OpenGL...." ) @@ -432,7 +432,7 @@ if(WXWIDGETS_FORCE_VERSION) set (wxWidgets_CONFIG_OPTIONS --version=${WXWIDGETS_FORCE_VERSION}) endif() -FIND_PACKAGE(wxWidgets REQUIRED) +FIND_PACKAGE(wxWidgets REQUIRED COMPONENTS ${wxWidgets_FIND_COMPONENTS}) IF(MSYS) # this is to convert msys to windows paths, and handle the missing /usr