Closed dgarroyo closed 9 years ago
On my end I have glew installed as a package (mingw-w64-x86_64-glew) and so:
add_definitions(-DGLEW_STATIC)
find_package(GLEW REQUIRED)
...works for me but chokes the Travis CI build.
I see that in \kiui-master\src\Ui\Nano\nanovg there are glew source files but my build throws linker errors without the above intervention.
I'd have to find a less verbose way to iterate over the files, but all the directory / file code is either kind of work in progress, or sample code, so I'm merging it if it fixes the build for some. I think GLEW could somehow be removed. NanoVG can work without, I just didn't have the time to find how.
Hopefully my changes will allow more people to build the KIUI library and the example executable.
How I built KIUI in my situation:
The type of build I did was an "out of source" build. I made a subdirectory inside kiui-master called 'mingwbuild' and then put in it a shell script containing:
cmake -DGLFW_INCLUDE_DIR=/C/msys64/mingw64/include/GLFW -DGLFW_LIBRARIES=/C/msys64/mingw64/lib/libglfw3.a -G "MSYS Makefiles" ..
If someone were using MSYS2 installed to c:\ and installed GLFW via Pacman this should work for them.
One thing I didn't address is how the data files are expected to be at C:\Program Files (x86)\KIUI and how permissions on that directory will cause make install to fail to create it. Just putting it there by hand took care of it, once I knew that was where it was expected to be.