From c09e8309df8d6a682a46d03b7f342e61bea6b411 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Fri, 10 Aug 2018 20:43:39 -0400 Subject: [PATCH] update cmakelists, think about normalizing `base_type` from `T` everywhere... consistency and stuff, y'know? --- CMakeLists.txt | 7 +++++++ sol/experimental_usertype.hpp | 4 ++-- sol/forward.hpp | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba52ded8..a24a92ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,6 +139,11 @@ CMAKE_DEPENDENT_OPTION(TESTS_DYNAMIC_LOADING_EXAMPLES "Enable build of dynamic l # # # sol2 Library # # Add a target for sol2's library to be included by external users add_library(sol2 INTERFACE) +add_library(sol2::sol2 ALIAS sol2) +set_target_properties(sol2 + PROPERTIES + EXPORT_NAME sol2::sol2) + target_include_directories(sol2 INTERFACE $ $) @@ -198,8 +203,10 @@ if (PYTHONINTERP_FOUND) add_custom_target(sol2_single_header ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/single/sol.hpp" "${CMAKE_CURRENT_BINARY_DIR}/single/sol_forward.hpp") add_library(sol2_single INTERFACE) + add_library(sol2::sol2_single ALIAS sol2_single) set_target_properties(sol2_single PROPERTIES + EXPORT_NAME sol2::sol2_single INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/single") add_dependencies(sol2_single sol2_single_header) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/single/sol.hpp" "${CMAKE_CURRENT_BINARY_DIR}/single/sol_forward.hpp" diff --git a/sol/experimental_usertype.hpp b/sol/experimental_usertype.hpp index d9ffacd4..fbdd5fbd 100644 --- a/sol/experimental_usertype.hpp +++ b/sol/experimental_usertype.hpp @@ -28,8 +28,8 @@ namespace sol { - template - struct metatable : basic_table { + template + struct basic_metatable : basic_table { }; diff --git a/sol/forward.hpp b/sol/forward.hpp index bcc472bc..ff3747ad 100644 --- a/sol/forward.hpp +++ b/sol/forward.hpp @@ -46,7 +46,7 @@ namespace sol { class usertype; template class simple_usertype; - template + template class basic_table_core; template using table_core = basic_table_core; @@ -54,8 +54,8 @@ namespace sol { using main_table_core = basic_table_core; template using stack_table_core = basic_table_core; - template - using basic_table = basic_table_core; + template + using basic_table = basic_table_core; typedef table_core table; typedef table_core global_table; typedef main_table_core main_table;