Thanks for all the input, everyone. I'd given up on this until yesterday, then, out of the blue, I decided I wasn't gonna let it whip me. So I logged out of Linux and came back here to Windows. And after chasing all the wrong answers to solve this, again, I looked in the cmake folder under the wxWidgets build directory. The readme file file instructed me to look at another readme file:
Code: Select all
C:\wxWidgets-3.1.5\docs\doxygen\overviews
That file provides this:
Code: Select all
Using find_package {#cmake_find_package}
------------------
You can use `find_package(wxWidgets)` to use a compiled version of wxWidgets.
Have a look at the [CMake Documentation](https://cmake.org/cmake/help/latest/module/FindwxWidgets.html)
for detailed instructions.
Your *CMakeLists.txt* would look like this:
~~~
...
find_package(wxWidgets REQUIRED COMPONENTS net core base)
include(${wxWidgets_USE_FILE})
add_executable(myapp myapp.cpp)
target_link_libraries(myapp ${wxWidgets_LIBRARIES})
~~~
The solution was right there all along, from the wxWidgets team. And after I doctored it up to fit my needs,
Code: Select all
cmake_minimum_required(VERSION 3.20)
project(Fishermen)
set(CMAKE_CXX_STANDARD 20)
find_package(wxWidgets REQUIRED COMPONENTS net core base)
include(${wxWidgets_USE_FILE})
set(SOURCE_FILES App.cpp)
add_executable(Fishermen
App.cpp
App.h
Fishermen.cpp
Fishermen.h
AddNewPerson.cpp
AddNewPerson.h
sqlite3ext.h
sqlite3.h
sqlite3.c)
target_link_libraries(Fishermen ${wxWidgets_LIBRARIES})
it worked on the first run!
I know that not everyone will stumble out of the gate and embarrass themselves like I have. But in the unlikely event there are, maybe this will help them