Skip to content

Commit ceb0bc1

Browse files
committed
move plib to dependency
1 parent f2997e8 commit ceb0bc1

File tree

12 files changed

+22
-1098
lines changed

12 files changed

+22
-1098
lines changed

CMakeLists.txt

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
22

33
include(FetchContent)
44

5-
project(plib)
5+
project(pscript)
66

77
set(CMAKE_CXX_STANDARD 20)
88

@@ -17,45 +17,43 @@ endif()
1717
option(PLIB_ENABLE_TESTS "Enable building tests" ${is_root_project})
1818
option(PLIB_BUILD_PSCRIPT_DEMO_APP "Enable pscript demo app" ON) # TODO: set default to off
1919

20-
if(PLIB_ENABLE_TESTS)
20+
if(${PSCRIPT_ENABLE_TESTS})
2121
add_subdirectory(tests)
2222
endif()
2323

2424
FetchContent_Declare(
2525
peglib
2626
GIT_REPOSITORY https://github.com/NotAPenguin0/cpp-peglib
2727
)
28+
2829
FetchContent_MakeAvailable(peglib)
2930

3031
FetchContent_Declare(
31-
fmt
32-
GIT_REPOSITORY https://github.com/fmtlib/fmt
32+
plib
33+
GIT_REPOSITORY https://github.com/NotAPenguin0/plib
3334
)
34-
FetchContent_MakeAvailable(fmt)
3535

36-
# TODO: Add option to exclude pscript
36+
FetchContent_MakeAvailable(plib)
37+
3738

38-
add_library(plib STATIC)
39-
target_sources(plib PRIVATE
39+
add_library(pscript STATIC)
40+
target_sources(pscript PRIVATE
4041
src/pscript/context.cpp
4142
src/pscript/memory.cpp
4243
src/pscript/value.cpp
4344
src/pscript/variable.cpp
4445
src/pscript/script.cpp
4546
)
46-
target_include_directories(plib PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" ${peglib_SOURCE_DIR})
47-
48-
target_link_libraries(plib PUBLIC fmt)
49-
target_include_directories(plib PRIVATE ${fmt_SOURCE_DIR}/include)
47+
target_include_directories(pscript PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" ${peglib_SOURCE_DIR})
5048

5149
target_compile_options(plib PRIVATE "-Wno-format")
5250

5351
# copy over modules to build directory
5452
file(GLOB_RECURSE MODULE_FILES "modules/*")
5553
add_custom_command(
56-
TARGET plib POST_BUILD
54+
TARGET pscript POST_BUILD
5755
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/modules/" ${${CMAKE_PROJECT_NAME}_BINARY_DIR}/pscript-modules
5856
DEPENDS ${MODULE_FILES}
59-
COMMENT "Copying plib modules"
57+
COMMENT "Copying pscript modules"
6058
VERBATIM
6159
)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# plib
1+
# pscript
22

3-
Library with utilities that I commonly use in my projects
3+
Custom programming language built for scripting plugins in my engine.

include/plib/bit_flag.hpp

Lines changed: 0 additions & 121 deletions
This file was deleted.

include/plib/bits.hpp

Lines changed: 0 additions & 22 deletions
This file was deleted.

include/plib/concepts.hpp

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)