cmake: fixed glog-modules.cmake installation
This commit is contained in:
parent
4df5ae7463
commit
64b4e327ff
32
.github/workflows/linux-builds.yml
vendored
32
.github/workflows/linux-builds.yml
vendored
@ -41,11 +41,13 @@ jobs:
|
||||
-G Ninja
|
||||
cmake --build build-googletest --target install
|
||||
|
||||
- name: Setup Environment
|
||||
if: ${{matrix.build_type == 'Debug'}}
|
||||
run: |
|
||||
echo 'CXXFLAGS=--coverage' >> $GITHUB_ENV
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
if [[ ${{matrix.build_type}} == "Debug" ]]; then
|
||||
export CXXFLAGS=--coverage
|
||||
fi
|
||||
cmake -S . -B build_${{matrix.build_type}} -G Ninja \
|
||||
-DBUILD_SHARED_LIBS=${{matrix.shared}} \
|
||||
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
|
||||
@ -64,18 +66,34 @@ jobs:
|
||||
--config ${{matrix.build_type}} \
|
||||
--target install
|
||||
|
||||
- name: Test CMake Package
|
||||
cmake build_${{matrix.build_type}} -G Ninja \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=${{runner.workspace}}/foo/include \
|
||||
-DCMAKE_INSTALL_LIBDIR=${{runner.workspace}}/foo/lib \
|
||||
-DCMAKE_INSTALL_DATAROOTDIR=${{runner.workspace}}/foo/share
|
||||
cmake --build build_${{matrix.build_type}} \
|
||||
--config ${{matrix.build_type}} \
|
||||
--target install
|
||||
|
||||
- name: Test CMake Package (relative GNUInstallDirs)
|
||||
run: |
|
||||
if [[ ${{matrix.build_type}} == "Debug" ]]; then
|
||||
export CXXFLAGS=--coverage
|
||||
fi
|
||||
cmake -S src/package_config_unittest/working_config \
|
||||
-B build_${{matrix.build_type}}_package \
|
||||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
||||
-DCMAKE_PREFIX_PATH=./build_${{matrix.build_type}}/install \
|
||||
-G Ninja
|
||||
cmake --build build_${{matrix.build_type}}_package \
|
||||
--config ${{matrix.build_type}}
|
||||
|
||||
- name: Test CMake Package (absolute GNUInstallDirs)
|
||||
run: |
|
||||
cmake -S src/package_config_unittest/working_config \
|
||||
-B build_${{matrix.build_type}}_package_foo \
|
||||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
||||
-DCMAKE_PREFIX_PATH=${{runner.workspace}}/foo \
|
||||
-G Ninja
|
||||
cmake --build build_${{matrix.build_type}}_package_foo \
|
||||
--config ${{matrix.build_type}}
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
ctest --test-dir build_${{matrix.build_type}} -j$(nproc) --output-on-failure
|
||||
|
||||
@ -1022,12 +1022,18 @@ configure_file (glog-modules.cmake.in
|
||||
install (CODE
|
||||
"
|
||||
set (glog_FULL_CMake_DATADIR \"\\\${CMAKE_CURRENT_LIST_DIR}/${glog_REL_CMake_DATADIR}\")
|
||||
set (glog_DATADIR_DESTINATION ${_glog_CMake_INSTALLDIR})
|
||||
|
||||
if (NOT IS_ABSOLUTE ${_glog_CMake_INSTALLDIR})
|
||||
set (glog_DATADIR_DESTINATION \"\${CMAKE_INSTALL_PREFIX}/\${glog_DATADIR_DESTINATION}\")
|
||||
endif (NOT IS_ABSOLUTE ${_glog_CMake_INSTALLDIR})
|
||||
|
||||
configure_file (\"${CMAKE_CURRENT_SOURCE_DIR}/glog-modules.cmake.in\"
|
||||
\"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/glog-modules.cmake\" @ONLY)
|
||||
file (INSTALL
|
||||
\"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/glog-modules.cmake\"
|
||||
DESTINATION
|
||||
\"\${CMAKE_INSTALL_PREFIX}/${_glog_CMake_INSTALLDIR}\")
|
||||
\"\${glog_DATADIR_DESTINATION}\")
|
||||
"
|
||||
COMPONENT Development
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user