first big sol3 push... tests not updated yet

This commit is contained in:
ThePhD 2018-09-27 22:27:38 -07:00
parent 94c4b7c89e
commit 0a9dc24f1f
No known key found for this signature in database
GPG Key ID: 1509DB1C0F702BFA
261 changed files with 1466 additions and 1972 deletions

View File

@ -1,4 +1,4 @@
# # # # sol2 # # # # sol3
# The MIT License (MIT) # The MIT License (MIT)
# #
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors # Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors

3
.gitignore vendored
View File

@ -1,4 +1,4 @@
# # # # sol2 # # # # sol3
# The MIT License (MIT) # The MIT License (MIT)
# #
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors # Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
@ -98,7 +98,6 @@ lua-5.1.5/
LuaJIT-2.1.0/ LuaJIT-2.1.0/
luajit-2.0.5/ luajit-2.0.5/
luajit-2.0.3/ luajit-2.0.3/
include/
liblua.a liblua.a
lib/liblua5.2.a lib/liblua5.2.a

View File

@ -1,4 +1,4 @@
# # # # sol2 # # # # sol3
# The MIT License (MIT) # The MIT License (MIT)
# #
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors # Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors

View File

@ -1,4 +1,4 @@
# # # # sol2 # # # # sol3
# The MIT License (MIT) # The MIT License (MIT)
# #
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors # Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
@ -20,7 +20,7 @@
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# # # # sol2 # # # # sol3
# # # Required minimum version statement # # # Required minimum version statement
cmake_minimum_required(VERSION 3.5.0) cmake_minimum_required(VERSION 3.5.0)
@ -145,7 +145,7 @@ set_target_properties(sol2
EXPORT_NAME sol2::sol2) EXPORT_NAME sol2::sol2)
target_include_directories(sol2 INTERFACE target_include_directories(sol2 INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>) $<INSTALL_INTERFACE:include>)
# # Version configurations # # Version configurations
@ -197,19 +197,19 @@ set(SOL2_DOCS_FOUND FALSE)
if (PYTHONINTERP_FOUND) if (PYTHONINTERP_FOUND)
if (SINGLE) if (SINGLE)
set(SOL2_SINGLE_FOUND TRUE) set(SOL2_SINGLE_FOUND TRUE)
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/single/sol.hpp" "${CMAKE_CURRENT_BINARY_DIR}/single/sol_forward.hpp" add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/single/sol/sol.hpp" "${CMAKE_CURRENT_BINARY_DIR}/single/sol/sol_forward.hpp"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/single" COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/sol/single"
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/single.py" --output "${CMAKE_CURRENT_BINARY_DIR}/single/sol.hpp") COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/single.py" --output "${CMAKE_CURRENT_BINARY_DIR}/single/sol/sol.hpp")
add_custom_target(sol2_single_header ALL add_custom_target(sol2_single_header ALL
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/single/sol.hpp" "${CMAKE_CURRENT_BINARY_DIR}/single/sol_forward.hpp") DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/single/sol/sol.hpp" "${CMAKE_CURRENT_BINARY_DIR}/single/sol/sol_forward.hpp")
add_library(sol2_single INTERFACE) add_library(sol2_single INTERFACE)
add_library(sol2::sol2_single ALIAS sol2_single) add_library(sol2::sol2_single ALIAS sol2_single)
set_target_properties(sol2_single set_target_properties(sol2_single
PROPERTIES PROPERTIES
EXPORT_NAME sol2::sol2_single EXPORT_NAME sol2::sol2_single
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/single") INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/single/")
add_dependencies(sol2_single sol2_single_header) add_dependencies(sol2_single sol2_single_header)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/single/sol.hpp" "${CMAKE_CURRENT_BINARY_DIR}/single/sol_forward.hpp" install(FILES "${CMAKE_CURRENT_BINARY_DIR}/single/sol/sol.hpp" "${CMAKE_CURRENT_BINARY_DIR}/single/sol/sol_forward.hpp"
DESTINATION include/sol/single/sol) DESTINATION include/sol/single/sol)
endif() endif()
if (DOCS) if (DOCS)

View File

@ -16,7 +16,7 @@ Find it [here](http://sol2.rtfd.io/). A run-through kind of tutorial is [here](h
## Sneak Peek ## Sneak Peek
```cpp ```cpp
#include <sol.hpp> #include <sol/sol.hpp>
#include <cassert> #include <cassert>
int main() { int main() {
@ -29,7 +29,7 @@ int main() {
``` ```
```cpp ```cpp
#include <sol.hpp> #include <sol/sol.hpp>
#include <cassert> #include <cassert>
struct vars { struct vars {

View File

@ -1,4 +1,4 @@
# # # # sol2 # # # # sol3
# The MIT License (MIT) # The MIT License (MIT)
# #
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors # Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors

View File

@ -1,4 +1,4 @@
# # # # sol2 # # # # sol3
# The MIT License (MIT) # The MIT License (MIT)
# #
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors # Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors

View File

@ -1,5 +1,5 @@
# # # # sol2 # # # # sol3
# The MIT License (MIT) # The MIT License (MIT)
# #
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors # Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors

View File

@ -1,4 +1,4 @@
# # # # sol2 # # # # sol3
# The MIT License (MIT) # The MIT License (MIT)
# #
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors # Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors

View File

@ -1,4 +1,4 @@
# # # # sol2 # # # # sol3
# The MIT License (MIT) # The MIT License (MIT)
# #
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors # Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors

View File

@ -1,4 +1,4 @@
# # # # sol2 # # # # sol3
# The MIT License (MIT) # The MIT License (MIT)
# #
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors # Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors

View File

@ -1,4 +1,4 @@
# # # # sol2 # # # # sol3
# The MIT License (MIT) # The MIT License (MIT)
# #
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors # Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors

View File

@ -1,4 +1,4 @@
# # # # sol2 # # # # sol3
# The MIT License (MIT) # The MIT License (MIT)
# #
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors # Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors

View File

@ -9,7 +9,7 @@ Sometimes in C++ it's useful to know where a Lua call is coming from and what :d
:linenos: :linenos:
#define SOL_CHECK_ARGUMENTS #define SOL_CHECK_ARGUMENTS
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -14,7 +14,7 @@ These are all the things. Use your browser's search to find things you want.
asserts / prerequisites asserts / prerequisites
----------------------- -----------------------
You'll need to ``#include <sol.hpp>``/``#include "sol.hpp"`` somewhere in your code. Sol is header-only, so you don't need to compile anything. However, **Lua must be compiled and available**. See the :doc:`getting started tutorial<getting-started>` for more details. You'll need to ``#include <sol/sol.hpp>``/``#include "sol.hpp"`` somewhere in your code. Sol is header-only, so you don't need to compile anything. However, **Lua must be compiled and available**. See the :doc:`getting started tutorial<getting-started>` for more details.
The implementation for ``assert.hpp`` with ``c_assert`` looks like so: The implementation for ``assert.hpp`` with ``c_assert`` looks like so:

View File

@ -93,7 +93,7 @@ To do this, you bind things using the ``new_usertype`` and ``set_usertype`` meth
.. code-block:: cpp .. code-block:: cpp
:caption: player_script.cpp :caption: player_script.cpp
#include <sol.hpp> #include <sol/sol.hpp>
int main () { int main () {
sol::state lua; sol::state lua;

View File

@ -13,7 +13,7 @@ Given a C++ function, you can drop it into Sol in several equivalent ways, worki
:caption: Registering C++ functions :caption: Registering C++ functions
:name: writing-functions :name: writing-functions
#include <sol.hpp> #include <sol/sol.hpp>
std::string my_function( int a, std::string b ) { std::string my_function( int a, std::string b ) {
// Create a string with the letter 'D' "a" times, // Create a string with the letter 'D' "a" times,

View File

@ -16,7 +16,7 @@ When you're ready, try compiling this short snippet:
:caption: test.cpp: the first snippet :caption: test.cpp: the first snippet
:name: the-first-snippet :name: the-first-snippet
#include <sol.hpp> // or #include "sol.hpp", whichever suits your needs #include <sol/sol.hpp> // or #include "sol.hpp", whichever suits your needs
int main (int argc, char* argv[]) { int main (int argc, char* argv[]) {
@ -47,7 +47,7 @@ The second line opens a single lua-provided library, "base". There are several o
:caption: test.cpp: the first snippet :caption: test.cpp: the first snippet
:name: the-second-snippet :name: the-second-snippet
#include <sol.hpp> #include <sol/sol.hpp>
int main (int argc, char* argv[]) { int main (int argc, char* argv[]) {

View File

@ -19,7 +19,7 @@ reading
:name: variables-main-cpp :name: variables-main-cpp
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
int main () { int main () {
@ -37,7 +37,7 @@ You can interact with the variables like this:
:name: extended-variables-main-cpp :name: extended-variables-main-cpp
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <tuple> #include <tuple>
#include <utility> // for std::pair #include <utility> // for std::pair
@ -121,7 +121,7 @@ Writing gets a lot simpler. Even without scripting a file or a string, you can r
:name: writing-main-cpp :name: writing-main-cpp
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>
@ -166,7 +166,7 @@ This example pretty much sums up what can be done. Note that the syntax ``lua["n
:name: lazy-main-cpp :name: lazy-main-cpp
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>
@ -194,7 +194,7 @@ Finally, it's possible to erase a reference/variable by setting it to ``nil``, u
:name: erase-main-cpp :name: erase-main-cpp
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
int main () { int main () {

View File

@ -61,9 +61,9 @@ function (MAKE_EXAMPLE example_source_file is_single)
PROPERTIES PROPERTIES
OUTPUT_NAME "${example_output_name}") OUTPUT_NAME "${example_output_name}")
if (is_single) if (is_single)
target_link_libraries(${example_name} sol2_single) target_link_libraries(${example_name} sol2::sol2_single)
else() else()
target_link_libraries(${example_name} sol2) target_link_libraries(${example_name} sol2::sol2)
endif() endif()
target_compile_features(${example_name} target_compile_features(${example_name}
PRIVATE ${CXX_FEATURES}) PRIVATE ${CXX_FEATURES})

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>
#include <vector> #include <vector>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"
#include <string> #include <string>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <vector> #include <vector>
#include <numeric> #include <numeric>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <vector> #include <vector>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <vector> #include <vector>
#include <map> #include <map>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <string> #include <string>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
// Something that can't be collided with // Something that can't be collided with
static const auto& script_key = "GlobalResource.MySpecialIdentifier123"; static const auto& script_key = "GlobalResource.MySpecialIdentifier123";

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>

View File

@ -1,10 +1,10 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
int main () { int main () {
struct callable { struct callable {
int operator()( int a, bool b ) { int operator()( int a, bool b ) {
return a + b ? 10 : 20; return a + (b ? 10 : 20);
} }
}; };

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
int main () { int main () {
class B { class B {

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <vector> #include <vector>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
struct A { struct A {
int a = 10; int a = 10;

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>
inline void my_panic(sol::optional<std::string> maybe_msg) { inline void my_panic(sol::optional<std::string> maybe_msg) {

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
int main (int, char*[]) { int main (int, char*[]) {
sol::state lua; sol::state lua;

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "../assert.hpp" #include "../assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,6 +1,6 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "../assert.hpp" #include "../assert.hpp"
int main() { int main() {

View File

@ -1,6 +1,6 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "../assert.hpp" #include "../assert.hpp"
struct vars { struct vars {

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,6 +1,6 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "../assert.hpp" #include "../assert.hpp"
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"
#include <iostream> #include <iostream>

View File

@ -44,7 +44,7 @@ function (make_luabridge_interop_example target_library is_single)
endif() endif()
endfunction() endfunction()
make_luabridge_interop_example(sol2 FALSE) make_luabridge_interop_example(sol2::sol2 FALSE)
if (SOL2_SINGLE_FOUND AND INTEROP_EXAMPLES_SINGLE) if (SOL2_SINGLE_FOUND AND INTEROP_EXAMPLES_SINGLE)
make_luabridge_interop_example(sol2_single TRUE) make_luabridge_interop_example(sol2::sol2_single TRUE)
endif() endif()

View File

@ -1,6 +1,6 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#define SOL_ENABLE_INTEROP 1 // MUST be defined to use interop features #define SOL_ENABLE_INTEROP 1 // MUST be defined to use interop features
#include <sol.hpp> #include <sol/sol.hpp>
#include <LuaBridge/LuaBridge.h> #include <LuaBridge/LuaBridge.h>

View File

@ -44,7 +44,7 @@ function (make_kaguya_interop_example target_library is_single)
endif() endif()
endfunction() endfunction()
make_kaguya_interop_example(sol2 FALSE) make_kaguya_interop_example(sol2::sol2 FALSE)
if (SOL2_SINGLE_FOUND AND INTEROP_EXAMPLES_SINGLE) if (SOL2_SINGLE_FOUND AND INTEROP_EXAMPLES_SINGLE)
make_kaguya_interop_example(sol2_single TRUE) make_kaguya_interop_example(sol2::sol2_single TRUE)
endif() endif()

View File

@ -2,7 +2,7 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#define SOL_ENABLE_INTEROP 1 // MUST be defined to use interop features #define SOL_ENABLE_INTEROP 1 // MUST be defined to use interop features
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>
#include "../../assert.hpp" #include "../../assert.hpp"

View File

@ -44,7 +44,7 @@ function (make_luwra_interop_example target_library is_single)
endif() endif()
endfunction() endfunction()
make_luwra_interop_example(sol2 FALSE) make_luwra_interop_example(sol2::sol2 FALSE)
if (SOL2_SINGLE_FOUND AND INTEROP_EXAMPLES_SINGLE) if (SOL2_SINGLE_FOUND AND INTEROP_EXAMPLES_SINGLE)
make_luwra_interop_example(sol2_single TRUE) make_luwra_interop_example(sol2::sol2_single TRUE)
endif() endif()

View File

@ -1,6 +1,6 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#define SOL_ENABLE_INTEROP 1 // MUST be defined to use interop features #define SOL_ENABLE_INTEROP 1 // MUST be defined to use interop features
#include <sol.hpp> #include <sol/sol.hpp>
#include <luwra.hpp> #include <luwra.hpp>

View File

@ -44,7 +44,7 @@ function(make_tolua_interop_example target_library is_single)
endif() endif()
endfunction() endfunction()
make_tolua_interop_example(sol2 FALSE) make_tolua_interop_example(sol2::sol2 FALSE)
if (SOL2_SINGLE_FOUND AND INTEROP_EXAMPLES_SINGLE) if (SOL2_SINGLE_FOUND AND INTEROP_EXAMPLES_SINGLE)
make_tolua_interop_example(sol2_single TRUE) make_tolua_interop_example(sol2::sol2_single TRUE)
endif() endif()

View File

@ -1,6 +1,6 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#define SOL_ENABLE_INTEROP 1 // MUST be defined to use interop features #define SOL_ENABLE_INTEROP 1 // MUST be defined to use interop features
#include <sol.hpp> #include <sol/sol.hpp>
#include "Player.h" #include "Player.h"
#include <tolua++.h> #include <tolua++.h>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <tuple> #include <tuple>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <string> #include <string>
#include <memory> #include <memory>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <map> #include <map>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <map> #include <map>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"
#include <iostream> #include <iostream>

View File

@ -67,8 +67,8 @@ function(make_require_from_dll_example target_lib is_single)
else() else()
target_link_libraries(${example_lib_name} PRIVATE ${LUA_LIBRARIES}) target_link_libraries(${example_lib_name} PRIVATE ${LUA_LIBRARIES})
endif() endif()
if (IS_X86) if (IS_X86)
target_compile_options(${example_lib_name} BEFORE PRIVATE -m32) target_compile_options(${example_lib_name} BEFORE PRIVATE -m32)
endif() endif()
target_link_libraries(${example_lib_name} PRIVATE ${target_lib}) target_link_libraries(${example_lib_name} PRIVATE ${target_lib})
target_include_directories(${example_lib_name} PUBLIC "${LUA_INCLUDE_DIRS}") target_include_directories(${example_lib_name} PUBLIC "${LUA_INCLUDE_DIRS}")
@ -101,7 +101,7 @@ function(make_require_from_dll_example target_lib is_single)
endif() endif()
endfunction() endfunction()
make_require_from_dll_example(sol2 FALSE) make_require_from_dll_example(sol2::sol2 FALSE)
if (SOL2_SINGLE_FOUND AND DYNAMIC_LOADING_EXAMPLES_SINGLE) if (SOL2_SINGLE_FOUND AND DYNAMIC_LOADING_EXAMPLES_SINGLE)
make_require_from_dll_example(sol2_single TRUE) make_require_from_dll_example(sol2::sol2_single TRUE)
endif() endif()

View File

@ -1,7 +1,7 @@
#include "my_object.hpp" #include "my_object.hpp"
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
namespace my_object { namespace my_object {

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "my_object.hpp" #include "my_object.hpp"
#include "../assert.hpp" #include "../assert.hpp"

View File

@ -1,7 +1,7 @@
// Thanks to OrfeasZ for their answer to // Thanks to OrfeasZ for their answer to
// an issue for this example! // an issue for this example!
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <iostream> #include <iostream>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include <string> #include <string>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,5 @@
#define SOL_CHECK_ARGUMENTS 1 #define SOL_CHECK_ARGUMENTS 1
#include <sol.hpp> #include <sol/sol.hpp>
#include "assert.hpp" #include "assert.hpp"

Some files were not shown because too many files have changed in this diff Show More