mirror of
https://github.com/CPunch/Laika.git
synced 2025-10-03 14:50:18 +00:00
Inital commit
lib/ is just [FoxNet](https://git.openpunk.com/CPunch/FoxNet) ported to C99
This commit is contained in:
25
cnc/CMakeLists.txt
Normal file
25
cnc/CMakeLists.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
set(CNC_INCLUDEDIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
project(LaikaCNC VERSION 1.0)
|
||||
|
||||
# Put CMake targets (ALL_BUILD/ZERO_CHECK) into a folder
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Set the project as the default startup project for VS
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT LaikaCNC)
|
||||
|
||||
# compile LaikaCNC
|
||||
file(GLOB_RECURSE CNCSOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/**.c)
|
||||
add_executable(LaikaCNC ${CNCSOURCE})
|
||||
target_link_libraries(LaikaCNC PUBLIC LaikaLib)
|
||||
|
||||
# add the 'DEBUG' preprocessor definition if we're compiling as Debug
|
||||
target_compile_definitions(LaikaCNC PUBLIC "$<$<CONFIG:Debug>:DEBUG>")
|
||||
|
||||
# add include directory
|
||||
target_include_directories(LaikaCNC PUBLIC ${CNC_INCLUDEDIR})
|
12
cnc/include/cnc.h
Normal file
12
cnc/include/cnc.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef LAIKA_CNC_H
|
||||
#define LAIKA_CNC_H
|
||||
|
||||
#include "laika.h"
|
||||
#include "lsocket.h"
|
||||
#include "lpolllist.h"
|
||||
|
||||
struct {
|
||||
struct sLaika_socket sock;
|
||||
} sLaika_cnc;
|
||||
|
||||
#endif
|
1
cnc/src/cnc.c
Normal file
1
cnc/src/cnc.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "cnc.h"
|
0
cnc/src/main.c
Normal file
0
cnc/src/main.c
Normal file
Reference in New Issue
Block a user