Switched to C++
This commit is contained in:
78
CMakeLists.txt
Normal file
78
CMakeLists.txt
Normal file
@@ -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}
|
||||
)
|
||||
0
.gitignore → rust/.gitignore
vendored
0
.gitignore → rust/.gitignore
vendored
0
Cargo.lock → rust/Cargo.lock
generated
0
Cargo.lock → rust/Cargo.lock
generated
6
src/main.cpp
Normal file
6
src/main.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cout << "dani has a small pp" << std::endl;
|
||||
}
|
||||
Reference in New Issue
Block a user