common/src/*.h -> common/include/
This commit is contained in:
parent
8b04672d34
commit
391db5c444
@ -14,5 +14,5 @@ mkdir -p build/
|
||||
cd build/
|
||||
cmake ..
|
||||
make
|
||||
./simworld
|
||||
server/simworld-daemon
|
||||
```
|
||||
|
2
TODO.gmi
2
TODO.gmi
@ -7,7 +7,7 @@ A list of things I'd like to accomplish
|
||||
* Create client to connect to daemon
|
||||
|
||||
## Completed
|
||||
* Split into client and server (and common library?)
|
||||
* Split into client, server, and common library
|
||||
* Write Makefile to automate compilation
|
||||
|
||||
## Planned
|
||||
|
@ -1,16 +1,17 @@
|
||||
# common/CMakeLists.txt
|
||||
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(libsimworld VERSION 0.0.1 LANGUAGES C)
|
||||
project(simworld VERSION 0.0.1 LANGUAGES C)
|
||||
|
||||
set(SOURCE_DIR ${CMAKE_SOURCE_DIR}/common/src)
|
||||
file(GLOB_RECURSE SOURCES ${SOURCE_DIR}/*.c)
|
||||
|
||||
add_library(${PROJECT_NAME} SHARED ${SOURCES})
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${SOURCE_DIR})
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/common/include)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LUA REQUIRED lua)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} ${LUA_LIBRARIES})
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE ${LUA_INCLUDE_DIRS})
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../error.h"
|
||||
#include "error.h"
|
||||
|
||||
struct entity_registrant_t {
|
||||
char const *name;
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "entity.h"
|
||||
#include "entity/entity.h"
|
||||
|
||||
void entity_init(struct entity_t *self, size_t id, size_t x, size_t y) {
|
||||
assert(self != NULL);
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "registry.h"
|
||||
#include "entity/registry.h"
|
||||
|
||||
#define MAX_NAME_LENGTH 32
|
||||
|
||||
|
@ -7,4 +7,4 @@ set(SOURCE_DIR ${CMAKE_SOURCE_DIR}/server/src)
|
||||
file(GLOB_RECURSE SOURCES ${SOURCE_DIR}/*.c)
|
||||
|
||||
add_executable(simworld-daemon ${SOURCES})
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE libsimworld)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE simworld)
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "render/render.h"
|
||||
#include "world.h"
|
||||
#include "render/render.h"
|
||||
|
||||
int main(void) {
|
||||
enum error_t err = ERR_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user