-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added cmake tooling #57
base: master
Are you sure you want to change the base?
Conversation
b7d9144
to
4807a24
Compare
@sammyfreg wrote:
My advice is that you should not merge this PR, and leave it opened so that people who are looking for it might find it and know that they need to adapt it because it might be outdated. |
@sammyfreg wrote:
By default, here are the options in the cmake file: option(NETIMGUI_BUILD_CLIENT "Build client" ON)
option(NETIMGUI_BUILD_IMGUI "Build imgui from sources in netImgui" ${PROJECT_IS_TOP_LEVEL})
option(NETIMGUI_BUILD_SAMPLES "Build samples" ${PROJECT_IS_TOP_LEVEL})
option(NETIMGUI_BUILD_SERVER_LIB "Build server lib" ${PROJECT_IS_TOP_LEVEL})
option(NETIMGUI_BUILD_SERVER_APP_SOKOL "Build server app" ${PROJECT_IS_TOP_LEVEL}) i.e.
|
e7718cf
to
0d0cae9
Compare
This CMake file was tested under linux, macOS and windows. Also added backend glfw_gl3 for samples.
I think I had been too fast in the last push, I added an ifdef inside Anyhow, it is not very important that it passes since this PR is meant to remain opened and not merged. |
Real easy to add GlfwGL3 support, tests on MacOS with glfw installed via brew (not tested on non-Darwin Unix, will update once I get around to that). Maybe will get around to glfw compilation on Windows. DPI is a bit wonky, but that can be fixed in menu. Will leave this here for posterity/those who dislike Cmake files. Simply replace the function not implemented.
|
What do you mean with 'wonki DPI'? It might be that you need to implement DPI awareness on a non window platform. Search for "@SAMPLE_EDIT (DPI Awareness)" in the Server source code (I mostly used the Dear ImGui's sample code for creating the Server Application and @SAMPLE_EDIT tags indicate where I made some small changes to the original sources) to see how it is handled. Basically, the platform code should be calling "NetImguiServer::UI::SetWindowDPI()" to let the Server Application what's the current Window DPI, to adjust the font size. |
If you are interested, this is a CMake file that I added. This CMake file was tested under linux, macOS and windows.
I also added a backend "glfw_gl3" for samples.
Feel free to close this PR if you prefer to continue with sharpmake only.
Note: this PR will not compile unless the simple fixes PR was applied before (in order to fix some compilation issues on diverse platforms)