45 lines
633 B
CMake
45 lines
633 B
CMake
# CMake entry point
|
|
cmake_minimum_required (VERSION 3.27.1)
|
|
project(CX C)
|
|
cmake_policy(SET CMP0072 NEW)
|
|
|
|
find_package(OpenGL REQUIRED)
|
|
find_package(GLEW REQUIRED)
|
|
find_package(glfw3 REQUIRED)
|
|
|
|
include_directories(
|
|
include/
|
|
.
|
|
)
|
|
|
|
set(ALL_LIBS
|
|
${OPENGL_LIBRARY}
|
|
glfw
|
|
GLEW
|
|
m
|
|
)
|
|
|
|
set(CMAKE_C_FLAGS "-O0 -ggdb -Wall")
|
|
|
|
add_definitions(
|
|
-DTW_STATIC
|
|
-DTW_NO_LIB_PRAGMA
|
|
-DTW_NO_DIRECT3D
|
|
-DGLEW_STATIC
|
|
-D_CRT_SECURE_NO_WARNINGS
|
|
)
|
|
|
|
add_executable(
|
|
cx
|
|
src/main.c
|
|
src/cx.c
|
|
src/tensor.c
|
|
src/model.c
|
|
src/shader.c
|
|
src/neural.c
|
|
)
|
|
|
|
target_link_libraries(
|
|
cx
|
|
${ALL_LIBS}
|
|
)
|