CMake not finding wxWidgets 2.9.4

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
Tapsa
Earned some good credits
Earned some good credits
Posts: 144
Joined: Tue Dec 06, 2011 5:52 pm
Location: Helsinki

CMake not finding wxWidgets 2.9.4

Post by Tapsa » Thu Sep 06, 2012 1:05 pm

So I recently decided to again test the latest development version of wxWidgets.
I have the latest stable MinGW and CMake installed, but for some reason I get this error:

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
Could NOT find wxWidgets (missing: wxWidgets_FOUND)
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindwxWidgets.cmake:831 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:10 (find_package)

My bat and CMake files for compiling work for wxWidgets 2.8.12. (I have the new wxWidgets in the same folder as the old one used to be.) Any ideas what could correct this error?

Manolo
Can't get richer than this
Can't get richer than this
Posts: 713
Joined: Mon Apr 30, 2012 11:07 pm

Re: CMake not finding wxWidgets 2.9.4

Post by Manolo » Thu Sep 06, 2012 3:53 pm

Why do you use Cmake? wxWidgets provides makefile.gcc ready to be used with Mingw:
mingw32-make -f makefile.gcc yourOptions...

The "new" (2.9.x I presume you mean) wxWidgets have changed a lot of things. So old makefiles (generated by Cmake) hardly would work.

Despite of my words, the first error line tells you a simpler problem: it can not find wxWidgets.
Review your own commads file (bat, etc).

Tapsa
Earned some good credits
Earned some good credits
Posts: 144
Joined: Tue Dec 06, 2011 5:52 pm
Location: Helsinki

Re: CMake not finding wxWidgets 2.9.4

Post by Tapsa » Thu Sep 06, 2012 4:04 pm

Well here are the CMake lines I use to get wxWidgets into my program:

find_package(wxWidgets COMPONENTS adv core base REQUIRED)
include( "${wxWidgets_USE_FILE}" )
target_link_libraries(AdvancedGenieEditor2 ${wxWidgets_LIBRARIES} genieutils)

Has the way to include wxWidgets in CMake lists changed?
In the bat file I have this:

-DwxWidgets_ROOT_DIR:PATH="C:\Cpp\wxWidgets"

I compiled wxWidgets with these lines:
mingw32-make -f makefile.gcc SHARED=0 BUILD=debug clean
mingw32-make -f makefile.gcc SHARED=0 BUILD=debug
mingw32-make -f makefile.gcc SHARED=0 BUILD=release clean
mingw32-make -f makefile.gcc SHARED=0 BUILD=release

Post Reply