diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..990936c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/ +cmake-build-debug/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9be4e92 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.25) +project(ssts C) + +add_executable(${PROJECT_NAME} main.c) + +# We need a CMAKE_DIR with some code to find external dependencies +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") + +find_package(OpenGL REQUIRED) +find_package(GLUT REQUIRED) +find_package(GLEW REQUIRED) + +include_directories(${PROJECT_NAME} ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS}) + +target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${GLEW_LIBRARIES}) \ No newline at end of file diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/main.c b/main.c new file mode 100644 index 0000000..5124e65 --- /dev/null +++ b/main.c @@ -0,0 +1,18 @@ +#include +#include +#include + +int main(int argc, char **argv) { + + glutInit(&argc, argv); + glutCreateWindow("Simple Space Time Simulator"); + GLenum err = glewInit(); + if (err != GLEW_OK) { + fprintf(stderr, "Error: %s\n", glewGetErrorString(err)); + return -1; + } + + fprintf(stdout, "Status: using GLEW %s\n", glewGetString(GLEW_VERSION)); + + return 0; +}