diff --git a/meson.build b/meson.build index f47a9c9..37ddb9e 100644 --- a/meson.build +++ b/meson.build @@ -18,7 +18,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # *********************************************************************** # -project('libconstants', 'cpp', version: 'v1.0.5', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0') +project('libconstants', 'cpp', version: 'v1.0.6', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0') # Add default visibility for all C++ targets add_project_arguments('-fvisibility=default', language: 'cpp') diff --git a/src/constants/public/const.h b/src/constants/include/fourdst/constants/const.h similarity index 100% rename from src/constants/public/const.h rename to src/constants/include/fourdst/constants/const.h diff --git a/src/constants/private/const.cpp b/src/constants/lib/const.cpp similarity index 99% rename from src/constants/private/const.cpp rename to src/constants/lib/const.cpp index d9986b9..885d2f5 100644 --- a/src/constants/private/const.cpp +++ b/src/constants/lib/const.cpp @@ -27,7 +27,7 @@ #include -#include "const.h" +#include "fourdst/constants/const.h" #include "embedded_constants.h" // Generated at build time by meson namespace fourdst::constant { diff --git a/src/constants/meson.build b/src/constants/meson.build index 4f8a456..7668dbe 100644 --- a/src/constants/meson.build +++ b/src/constants/meson.build @@ -1,24 +1,24 @@ # Define the library const_sources = files( - 'private/const.cpp', + 'lib/const.cpp', ) -const_headers = files( - 'public/const.h' -) # Define the libconst library so it can be linked against by other parts of the build system libconst = library('const', const_sources, - include_directories: include_directories('public'), + include_directories: include_directories('include'), cpp_args: ['-fvisibility=default'], dependencies: [const_data_dep], install : true) const_dep = declare_dependency( - include_directories: include_directories('public'), + include_directories: include_directories('include'), link_with: libconst, ) # Make headers accessible +const_headers = files( + 'include/fourdst/constants/const.h' +) install_headers(const_headers, subdir : 'fourdst/fourdst/constants') diff --git a/tests/constants/constTest.cpp b/tests/constants/constTest.cpp index eae3798..894ae10 100644 --- a/tests/constants/constTest.cpp +++ b/tests/constants/constTest.cpp @@ -1,11 +1,12 @@ #include -#include "const.h" #include #include #include #include #include +#include "fourdst/constants/const.h" + /** * @file constTest.cpp * @brief Unit tests for the const class. diff --git a/tests/constants/meson.build b/tests/constants/meson.build index 53ec814..5f8cc17 100644 --- a/tests/constants/meson.build +++ b/tests/constants/meson.build @@ -12,8 +12,6 @@ foreach test_file : test_sources exe_name, test_file, dependencies: [gtest_dep, const_dep, gtest_main], - include_directories: include_directories('../../src/constants/public'), - link_with: libconst, # Link the dobj library install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly )