diff --git a/C++/Verlet Cloth/.gitignore b/C++/Verlet Cloth/.gitignore new file mode 100644 index 0000000..f48bd09 --- /dev/null +++ b/C++/Verlet Cloth/.gitignore @@ -0,0 +1,5 @@ +.vscode/ +CMakeFiles/ +CMakeCache.txt +Makefile +cmake_install.cmake diff --git a/C++/Verlet Cloth/CMakeLists.txt b/C++/Verlet Cloth/CMakeLists.txt new file mode 100644 index 0000000..ea5394d --- /dev/null +++ b/C++/Verlet Cloth/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.7) +project(VerletCloth) + +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} CMakeFiles/) +cmake_policy(SET CMP0037 OLD) + +set(Executable output) +set(SourceDir src) + +# set(IncludeDir include/) # Change include/ to your include directory +# include_directories(${IncludeDir}) + +file(GLOB_RECURSE SourceFiles + ${SourceDir}/*.cpp +) + +set(THREADS_PREFER_PTHREAD_FLAD ON) +find_package(Threads REQUIRED) + +find_package(OpenGL REQUIRED) + +if (UNIX) + find_package(X11 REQUIRED) + find_package(PNG REQUIRED) + include_directories(${PNG_INCLUDE_DIR}) +endif (UNIX) + +if (WIN32) + target_include_directories(${WinSDK}) +endif (WIN32) + +add_executable(${Executable} + ${SourceFiles} +) + +target_link_libraries(${Executable} + Threads::Threads + OpenGL::OpenGL + OpenGL::GL + OpenGL::GLX +) + +if (UNIX) + target_link_libraries(${Executable} + ${X11_LIBRARIES} + PNG::PNG + ) +endif (UNIX) +if (WIN32) + target_link_libraries(${Executable} + ${WinSDK} + ) +endif (WIN32) diff --git a/C++/Verlet Cloth/output b/C++/Verlet Cloth/output index 40f823f..ee4c2b3 100755 Binary files a/C++/Verlet Cloth/output and b/C++/Verlet Cloth/output differ diff --git a/C++/Verlet Cloth/main.cpp b/C++/Verlet Cloth/src/main.cpp similarity index 100% rename from C++/Verlet Cloth/main.cpp rename to C++/Verlet Cloth/src/main.cpp diff --git a/C++/Verlet Cloth/olcPixelGameEngine.h b/C++/Verlet Cloth/src/olcPixelGameEngine.h similarity index 100% rename from C++/Verlet Cloth/olcPixelGameEngine.h rename to C++/Verlet Cloth/src/olcPixelGameEngine.h