Skip to content

Installing sqlpp23 does not install the .cppm files #57

@MeanSquaredError

Description

@MeanSquaredError

Installing sqlpp23 using CMake does not install the .cppm files (the so-called module interface units). Usually I am building, testing and installing the library using something along the lines of:

cmake -B build -G Ninja -DBUILD_POSTGRESQL_CONNECTOR=ON -DBUILD_SQLITE3_CONNECTOR=ON -DBUILD_MYSQL_CONNECTOR=ON -DBUILD_TESTING=ON -DDEPENDENCY_CHECK=ON -DBUILD_WITH_MODULES=ON
cmake --build build
cd build
ctest
cd ..
cmake --install build

The installs the headers (*.h), the CMake config scripts (*.cmake) and the sqlpp23-ddl2cpp executable, but it doesn't install the module interface files (*.cppm) which are essential if one wants to import the library as module(s). So far I've been copying these manually but obviously this should be automated.

I can provide a PR that installs the .cppm files, but the question is where should those files be installed to? It seems that there is no established location for the .cppm files. There are a couple of places online where they discuss the proper location for the .cppm files:
https://crascit.com/2024/04/04/cxx-modules-cmake-shared-libraries/#h-installing-shared-libraries-with-c-20-modules
https://stackoverflow.com/questions/78064048/where-should-i-install-c-module-interfaces-units

However neither of these discussions provide a definite answer to that question.

IMHO we could put the modules in ${INSTALL_PREFIX}/module/sqlpp23
For example if the .h files go into /usr/local/include/sqlpp23/, the modules should go into /usr/local/module/sqlpp23/.
Admittedly it is a non-standard location, but at this point any location would be non-standard. :-)

So once we have a clear idea about the proper install location, I can provide a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions