diff --git a/.gitmodules b/.gitmodules index 26b7b90f290470d564eeb8526ec60b76723feaf1..75e2a9fa96172e6ebf90b9c521978ce70f402bd8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,9 @@ [submodule "libs/googletest"] path = libs/googletest url = https://github.com/google/googletest.git +[submodule "libs/imgui"] + path = libs/imgui + url = https://github.com/armin-co/imgui.git +[submodule "libs/cpp_starter_project"] + path = libs/cpp_starter_project + url = https://github.com/armin-co/cpp_starter_project.git \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f3c5d712819558d928d08fd544e633461414d64..98f9a3292c635bdf2ca50a1339480e5642f14249 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,8 +23,9 @@ find_package(PkgConfig REQUIRED) # Add qpong lib for core qpong functionality add_subdirectory(qpong_core) -include_directories(qpong_core) +# Dear ImGui based application +add_subdirectory(imgui_app) # Add dir with gtk qpong app add_subdirectory(gtk_qpong_app) diff --git a/gtk_qpong_app/CMakeLists.txt b/gtk_qpong_app/CMakeLists.txt index bafe30a2e44db8c7e4e56c7e308eeef8513ea929..33337906b395cd5588f87990a6873a6ec2f5c3c4 100644 --- a/gtk_qpong_app/CMakeLists.txt +++ b/gtk_qpong_app/CMakeLists.txt @@ -13,6 +13,7 @@ link_directories(${GTKMM_LIBRARY_DIRS}) # get all GTKMM dependencies and configuration include_directories(${GTKMM_INCLUDE_DIRS}) +include_directories(../qpong_core) if(APPLE) include_directories(/usr/local/include) @@ -28,16 +29,9 @@ add_executable( qpong.app ) -# we do need some threads -find_package(Threads) - - # link all necessary libs to the target target_link_libraries( qpong.app qpong_core - ${CMAKE_THREAD_LIBS_INIT} ${GTKMM_LIBRARIES} - fftw3 - fftw3_omp m # math ) diff --git a/imgui_app/CMakeLists.txt b/imgui_app/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..a1015dcb7e97e16491c564ebcb59fbffbadd1de5 --- /dev/null +++ b/imgui_app/CMakeLists.txt @@ -0,0 +1,10 @@ +# Specific settings for macOS +if(APPLE) + link_directories("/usr/local/lib") + message("ATTENTION: You probably have to export the PKG_CONFIG_PATH.") + message("For example: export PKG_CONFIG_PATH=\"/usr/local/lib:/usr/local/opt/zlib/lib/pkgconfig\"") +endif() + + +add_executable(imgui_playground.app +imgui_playground.cpp) \ No newline at end of file diff --git a/imgui_app/imgui_playground.cpp b/imgui_app/imgui_playground.cpp new file mode 100644 index 0000000000000000000000000000000000000000..78d323132a98d910b08571ed236515817eb70600 --- /dev/null +++ b/imgui_app/imgui_playground.cpp @@ -0,0 +1,11 @@ +/// @file imgui_playground.cppp +/// @author Armin Co +/// @brief Working example for Dear ImGui with OpenGL3 and SDL2 +/// + + +int main(void) +{ + + return 0; +} \ No newline at end of file diff --git a/libs/cpp_starter_project b/libs/cpp_starter_project new file mode 160000 index 0000000000000000000000000000000000000000..d7a2b6b891d75edc68c9d88dca7e24cd73e378b8 --- /dev/null +++ b/libs/cpp_starter_project @@ -0,0 +1 @@ +Subproject commit d7a2b6b891d75edc68c9d88dca7e24cd73e378b8 diff --git a/libs/imgui b/libs/imgui new file mode 160000 index 0000000000000000000000000000000000000000..ae93691360ad28e6c217138ead55c874dda26f80 --- /dev/null +++ b/libs/imgui @@ -0,0 +1 @@ +Subproject commit ae93691360ad28e6c217138ead55c874dda26f80 diff --git a/qpong_core/CMakeLists.txt b/qpong_core/CMakeLists.txt index b6f2974fbc7fd21e6f24281e53c9e9b92c555f67..3e2f2ab33774defe2914b765f7fd6c61f2603648 100644 --- a/qpong_core/CMakeLists.txt +++ b/qpong_core/CMakeLists.txt @@ -4,4 +4,12 @@ if(APPLE) endif() # Core QPong library -add_library(qpong_core Particle.cpp ImageBuffer.cpp Player.cpp) \ No newline at end of file +add_library(qpong_core Particle.cpp ImageBuffer.cpp Player.cpp) + +find_package(Threads) + +target_link_libraries( qpong_core + ${CMAKE_THREAD_LIBS_INIT} + fftw3 + fftw3_omp +) \ No newline at end of file