more cmake fixes
This commit is contained in:
parent
b243561eec
commit
b389e476fa
|
|
@ -1,5 +1,5 @@
|
|||
function(create_resources directory output)
|
||||
file(WRITE ${output} "")
|
||||
file(WRITE ${output} "#include <stdint.h>\n\n")
|
||||
file(GLOB bins ${directory}/*)
|
||||
|
||||
foreach(bin ${bins})
|
||||
|
|
@ -11,9 +11,8 @@ function(create_resources directory output)
|
|||
file(READ ${bin} filedata HEX)
|
||||
string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1, " filedata ${filedata})
|
||||
string(REGEX REPLACE "..$" "" filedata ${filedata})
|
||||
|
||||
file(APPEND ${output} "#include <stdint.h>\n\n")
|
||||
|
||||
file(APPEND ${output} "const uint8_t ${filename}[] = { ${filedata} };\n")
|
||||
file(APPEND ${output} "const uint64_t ${filename}_size = sizeof(${filename});")
|
||||
file(APPEND ${output} "const uint64_t ${filename}_size = sizeof(${filename});\n\n")
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
|
@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.4)
|
|||
|
||||
project(RNR)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
|
||||
include(CMake/CreateResources.cmake)
|
||||
|
||||
option(COMPILE_PLAYER "Compile the RNR player" ON)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
include_directories(Engine/Header)
|
||||
# Luau
|
||||
set(LUAU_BUILD_CLI OFF CACHE BOOL "" FORCE)
|
||||
set(LUAU_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||
|
||||
add_subdirectory(${DEPENDENCIES_DIR}/Luau Build)
|
||||
add_subdirectory(${DEPENDENCIES_DIR}/Luau ${CMAKE_BINARY_DIR}/Dependencies/Luau)
|
||||
|
||||
# RNR
|
||||
add_subdirectory(Engine)
|
||||
add_subdirectory(Client)
|
||||
add_subdirectory(Client)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
add_subdirectory(${DEPENDENCIES_DIR}/GLAD Build)
|
||||
add_subdirectory(${DEPENDENCIES_DIR}/GLAD ${CMAKE_BINARY_DIR}/Dependencies/GLAD)
|
||||
|
||||
project(Common)
|
||||
|
||||
|
|
@ -14,5 +14,5 @@ qt_add_library(Common STATIC
|
|||
Source/GL/Widget.cpp
|
||||
)
|
||||
|
||||
include_directories(Header)
|
||||
target_include_directories(Common PUBLIC Header)
|
||||
target_link_libraries(Common PUBLIC ${QT6_LIBRARIES_INCL} Engine)
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
project(Player)
|
||||
|
||||
create_resources(Resource ${CMAKE_BINARY_DIR}/PlayerResources.hpp)
|
||||
create_resources(Resource ${CMAKE_BINARY_DIR}/Resources/PlayerResources.hpp)
|
||||
|
||||
qt_add_executable(Player
|
||||
${CMAKE_BINARY_DIR}/Resources/PlayerResources.hpp
|
||||
|
||||
Header/MainWindow.hpp
|
||||
|
||||
Source/main.cpp
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
project(Server)
|
||||
|
||||
create_resources(Resources ${CMAKE_BINARY_DIR}/ServerResources.hpp)
|
||||
create_resources(Resource ${CMAKE_BINARY_DIR}/Resources/ServerResources.hpp)
|
||||
|
||||
add_executable(Server
|
||||
${CMAKE_BINARY_DIR}/Resources/ServerResources.hpp
|
||||
|
||||
Source/main.cpp
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
project(Studio)
|
||||
|
||||
create_resources(Resource ${CMAKE_BINARY_DIR}/StudioResources.hpp)
|
||||
create_resources(Resource ${CMAKE_BINARY_DIR}/Resources/StudioResources.hpp)
|
||||
|
||||
qt_add_executable(Studio
|
||||
${CMAKE_BINARY_DIR}/Resources/StudioResources.hpp
|
||||
|
||||
Header/MainWindow.hpp
|
||||
|
||||
Source/main.cpp
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
project(Engine)
|
||||
|
||||
include_directories(Engine/Header)
|
||||
|
||||
add_library(Engine STATIC
|
||||
Header/Helpers/Name.hpp
|
||||
Header/Helpers/Strings.hpp
|
||||
|
|
@ -18,4 +20,5 @@ add_library(Engine STATIC
|
|||
Source/Rendering/Adorn.cpp
|
||||
)
|
||||
|
||||
target_include_directories(Engine PUBLIC Header)
|
||||
target_link_libraries(Engine PUBLIC ${BOOST_LIBRARIES} cglm Luau.Analysis Luau.Ast Luau.Compiler Luau.VM)
|
||||
|
|
@ -12,5 +12,5 @@ namespace RNR
|
|||
static void compare(const RNR::Name* a, const RNR::Name* b);
|
||||
static void declare(const char* sName, int dictionaryIndex);
|
||||
static std::map<int, RNR::Name*>* dictionary;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
namespace RNR
|
||||
{
|
||||
class TextureProxyBase
|
||||
{
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -6,15 +6,15 @@ namespace RNR
|
|||
|
||||
char* Name::c_str()
|
||||
{
|
||||
//
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void Name::compare(const RNR::Name* a, const RNR::Name* b)
|
||||
void Name::compare(const RNR::Name* a, const RNR::Name* b)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
static void Name::declare(const char* sName, int dictionaryIndex)
|
||||
void Name::declare(const char* sName, int dictionaryIndex)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue