- Started setting up a thread safe window manager
- Created thread & atomic structures
This commit is contained in:
@@ -16,13 +16,13 @@
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
# ======================================================================================================================
|
||||
|
||||
cmake_minimum_required(VERSION 3.28)
|
||||
cmake_minimum_required(VERSION 3.28...3.31)
|
||||
|
||||
project(fennec)
|
||||
set(FENNEC_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
macro(fennec_add_sources)
|
||||
list(APPEND FENNEC_EXTRA_SOURCES ${ARGN})
|
||||
list(APPEND FENNEC_SOURCES ${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(fennec_add_definitions)
|
||||
@@ -37,6 +37,10 @@ macro(fennec_add_shared_libraries)
|
||||
list(APPEND FENNEC_SHARED_LIBRARIES ${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(fennec_add_compile_options)
|
||||
list(APPEND FENNEC_PRIVATE_COMPILE_OPTIONS ${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(fennec_add_link_options)
|
||||
list(APPEND FENNEC_PRIVATE_LINK_OPTIONS ${ARGN})
|
||||
endmacro()
|
||||
@@ -76,12 +80,9 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${FENNEC_SOURCE_DIR}/lib/${FENNEC_BUILD_NAME}
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${FENNEC_SOURCE_DIR}/lib/${FENNEC_BUILD_NAME})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${FENNEC_SOURCE_DIR}/bin/${FENNEC_BUILD_NAME})
|
||||
|
||||
# add the test suite as a sub-project
|
||||
add_subdirectory(test)
|
||||
|
||||
add_library(fennec STATIC
|
||||
|
||||
# CORE =================================================================================================================
|
||||
# Core Files
|
||||
fennec_add_sources(
|
||||
# CORE =================================================================================================================
|
||||
include/fennec/core/engine.h source/core/engine.cpp
|
||||
include/fennec/core/event.h source/core/event.cpp
|
||||
include/fennec/core/logger.h source/core/logger.cpp
|
||||
@@ -90,7 +91,7 @@ add_library(fennec STATIC
|
||||
include/fennec/core/system.h
|
||||
|
||||
|
||||
# SCENE ================================================================================================================
|
||||
# SCENE ================================================================================================================
|
||||
include/fennec/scene/scene.h source/scene/scene.cpp
|
||||
include/fennec/scene/component.h
|
||||
include/fennec/scene/scene_node.h
|
||||
@@ -99,7 +100,7 @@ add_library(fennec STATIC
|
||||
|
||||
|
||||
|
||||
# RENDERERS ============================================================================================================
|
||||
# RENDERERS ============================================================================================================
|
||||
include/fennec/renderers/interface/forward.h
|
||||
|
||||
include/fennec/renderers/interface/gfxcontext.h
|
||||
@@ -107,7 +108,7 @@ add_library(fennec STATIC
|
||||
include/fennec/renderers/interface/gfxresourcepool.h
|
||||
|
||||
|
||||
# CONTAINERS ===========================================================================================================
|
||||
# CONTAINERS ===========================================================================================================
|
||||
include/fennec/containers/containers.h
|
||||
|
||||
include/fennec/containers/array.h
|
||||
@@ -135,7 +136,7 @@ add_library(fennec STATIC
|
||||
include/fennec/containers/detail/_tuple.h
|
||||
|
||||
|
||||
# lang =================================================================================================================
|
||||
# lang =================================================================================================================
|
||||
include/fennec/lang/lang.h
|
||||
include/fennec/lang/metaprogramming.h
|
||||
|
||||
@@ -172,7 +173,7 @@ add_library(fennec STATIC
|
||||
include/fennec/lang/detail/_type_sequences.h
|
||||
|
||||
|
||||
# RTTI =================================================================================================================
|
||||
# RTTI =================================================================================================================
|
||||
include/fennec/rtti/typeid.h
|
||||
include/fennec/rtti/type_data.h
|
||||
include/fennec/rtti/type.h
|
||||
@@ -189,7 +190,7 @@ add_library(fennec STATIC
|
||||
include/fennec/rtti/detail/_type_name.h
|
||||
|
||||
|
||||
# MEMORY ===============================================================================================================
|
||||
# MEMORY ===============================================================================================================
|
||||
include/fennec/memory/new.h source/memory/new.cpp
|
||||
|
||||
include/fennec/memory/allocator.h
|
||||
@@ -201,11 +202,11 @@ add_library(fennec STATIC
|
||||
|
||||
include/fennec/memory/detail/_ptr_traits.h
|
||||
|
||||
# DEBUG ================================================================================================================
|
||||
# DEBUG ================================================================================================================
|
||||
source/debug/assert_impl.cpp
|
||||
|
||||
|
||||
# MATH =================================================================================================================
|
||||
# MATH =================================================================================================================
|
||||
include/fennec/math/math.h
|
||||
|
||||
include/fennec/math/scalar.h
|
||||
@@ -230,6 +231,7 @@ add_library(fennec STATIC
|
||||
include/fennec/math/ext/constants.h
|
||||
include/fennec/math/ext/primes.h
|
||||
include/fennec/math/ext/quaternion.h
|
||||
include/fennec/math/ext/rect.h
|
||||
include/fennec/math/ext/transform.h
|
||||
|
||||
|
||||
@@ -241,7 +243,7 @@ add_library(fennec STATIC
|
||||
|
||||
|
||||
|
||||
# string ===============================================================================================================
|
||||
# string ===============================================================================================================
|
||||
include/fennec/string/locale.h
|
||||
include/fennec/string/cstring.h
|
||||
include/fennec/string/string.h
|
||||
@@ -250,7 +252,7 @@ add_library(fennec STATIC
|
||||
|
||||
|
||||
|
||||
# format ===============================================================================================================
|
||||
# format ===============================================================================================================
|
||||
include/fennec/format/format.h
|
||||
include/fennec/format/format_arg.h
|
||||
include/fennec/format/formatter.h
|
||||
@@ -262,46 +264,55 @@ add_library(fennec STATIC
|
||||
|
||||
|
||||
|
||||
# filesystem ===========================================================================================================
|
||||
# filesystem ===========================================================================================================
|
||||
include/fennec/filesystem/file.h source/filesystem/file.cpp
|
||||
include/fennec/filesystem/path.h source/filesystem/path.cpp
|
||||
|
||||
|
||||
|
||||
# interpret ============================================================================================================
|
||||
# interpret ============================================================================================================
|
||||
include/fennec/interpret/tokenizer.h
|
||||
|
||||
|
||||
# PLATFORM =============================================================================================================
|
||||
# PLATFORM =============================================================================================================
|
||||
|
||||
include/fennec/platform/interface/fwd.h
|
||||
include/fennec/platform/interface/display_server.h
|
||||
include/fennec/platform/interface/platform.h source/platform/interface/platform.cpp
|
||||
include/fennec/platform/interface/window.h source/platform/interface/window.cpp
|
||||
|
||||
# GRAPHICS =============================================================================================================
|
||||
# GRAPHICS =============================================================================================================
|
||||
|
||||
include/fennec/gfx3d/mesh_instance.h
|
||||
)
|
||||
|
||||
# EXTRA SOURCES ========================================================================================================
|
||||
# add the test suite as a sub-project
|
||||
add_subdirectory(test)
|
||||
|
||||
${FENNEC_EXTRA_SOURCES}
|
||||
include/fennec/math/ext/rect.h
|
||||
include/fennec/platform/opengl/egl/error.h
|
||||
add_library(fennec STATIC
|
||||
${FENNEC_SOURCES}
|
||||
include/fennec/platform/window_manager.h
|
||||
include/fennec/platform/window_manager.cpp
|
||||
include/fennec/platform/window_manager.h
|
||||
include/fennec/lang/function.h
|
||||
include/fennec/threading/thread.h
|
||||
include/fennec/threading/detail/_thread.h
|
||||
include/fennec/lang/detail/_function.h
|
||||
include/fennec/threading/atomic.h
|
||||
|
||||
)
|
||||
|
||||
add_dependencies(fennec metaprogramming fennec-dependencies)
|
||||
|
||||
target_compile_definitions(fennec PUBLIC
|
||||
${FENNEC_COMPILE_DEFINITIONS}
|
||||
)
|
||||
target_compile_definitions(fennec PUBLIC ${FENNEC_COMPILE_DEFINITIONS})
|
||||
target_compile_options(fennec PRIVATE ${FENNEC_PRIVATE_COMPILE_OPTIONS})
|
||||
|
||||
|
||||
target_link_options(fennec PRIVATE ${FENNEC_PRIVATE_LINK_OPTIONS}) # Do not compile base fennec library with c++ stdlib
|
||||
# Do not compile base fennec library with c++ stdlib
|
||||
# fennec does not use the C++ stdlib because it is bloated, difficult to read, and implementation defined.
|
||||
# This implementation is designed to be as readable as possible, and expose information that would otherwise be obfuscated
|
||||
target_link_options(fennec PRIVATE ${FENNEC_PRIVATE_LINK_OPTIONS})
|
||||
|
||||
|
||||
|
||||
target_link_libraries(fennec PRIVATE
|
||||
${FENNEC_LINK_LIBRARIES}
|
||||
|
||||
Reference in New Issue
Block a user