diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..dca95c6 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,78 @@ +# Cmake OwO + +cmake_minimum_required(VERSION 3.7) +project(2D_GLOBAL_ILLUMINATION) + +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} CMakeModules/) +cmake_policy(SET CMP0037 OLD) # alow for spaces in file names + +set(CMAKE_BUILD_TYPE Debug) +# set(CMAKE_CXX_FLAGS "-Ofast") + +set(exe output) +set(src ./src) +set(include ./include) + +# Adds RESOURCES constant in C++ +add_definitions(-DRESOURCES="${CMAKE_SOURCE_DIR}/resources/") +message(${CMAKE_SOURCE_DIR}/resources) + +if (UNIX) + find_package(SDL2 REQUIRED) +endif(UNIX) + +if (WIN32) + include_directories(${executable} + "C:/dev/glm" + "C:/dev/SDL2/include/" + "C:/dev/SDL2_image/include/" + ) +endif (WIN32) + + +set(THREADS_PREFER_PTHREAD_FLAD ON) +find_package(Threads REQUIRED) +find_package(OpenGL REQUIRED) + +if (UNIX) + include_directories(${executable} + ${SDL2_INCLUDE_DIR} + ) +endif (UNIX) + +include_directories(${executable} + ${IncludeDIR} +) + +file(GLOB SourceFiles + ${SrcDIR}/* +) + +add_executable(${executable} ${SourceFiles}) + +set_target_properties(${executable} PROPERTIES + CXX_STANDARD 17 + CXX_EXTENSIONS OFF +) + +if (UNIX) + target_link_libraries(${executable} + SDL2 + OpenGL::OpenGL + OpenGL::GL + Threads::Threads + ) +endif (UNIX) + +if (WIN32) + target_link_libraries(${executable} + "C:/dev/SDL2/lib/x64/SDL2.lib" + "C:/dev/SDL2/lib/x64/SDL2main.lib" + "C:/dev/SDL2/lib/x64/SDL2test.lib" + ${WinSDK} + ) +endif (WIN32) + +target_link_libraries(${executable} + ${CMAKE_DL_LIBS} +) diff --git a/.gitignore b/rust/.gitignore similarity index 100% rename from .gitignore rename to rust/.gitignore diff --git a/Cargo.lock b/rust/Cargo.lock similarity index 100% rename from Cargo.lock rename to rust/Cargo.lock diff --git a/Cargo.toml b/rust/Cargo.toml similarity index 100% rename from Cargo.toml rename to rust/Cargo.toml diff --git a/src/main.rs b/rust/src/main.rs similarity index 100% rename from src/main.rs rename to rust/src/main.rs diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..eb288c5 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,6 @@ +#include + +int main() +{ + std::cout << "dani has a small pp" << std::endl; +}