Merge pull request #739 from google/cmake-glog-modules-install
fix `glog-modules.cmake` install
This commit is contained in:
commit
9206460cd3
46
.github/workflows/linux-builds.yml
vendored
46
.github/workflows/linux-builds.yml
vendored
@ -41,21 +41,59 @@ 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}} \
|
||||
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
|
||||
-DCMAKE_PREFIX_PATH=./install \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=./install \
|
||||
-DWITH_CUSTOM_PREFIX=${{matrix.custom_prefix}}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake --build build_${{matrix.build_type}} \
|
||||
--config ${{matrix.build_type}}
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
cmake --build build_${{matrix.build_type}} \
|
||||
--config ${{matrix.build_type}} \
|
||||
--target install
|
||||
|
||||
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: |
|
||||
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
|
||||
|
||||
1
AUTHORS
1
AUTHORS
@ -19,7 +19,6 @@ Guillaume Dumont <dumont.guillaume@gmail.com>
|
||||
Marco Wang <m.aesophor@gmail.com>
|
||||
Michael Tanner <michael@tannertaxpro.com>
|
||||
MiniLight <MiniLightAR@Gmail.com>
|
||||
Niklas Hambuechen <mail@nh2.me>
|
||||
romange <romange@users.noreply.github.com>
|
||||
Roman Perepelitsa <roman.perepelitsa@gmail.com>
|
||||
Sergiu Deitsch <sergiu.deitsch@gmail.com>
|
||||
|
||||
@ -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
|
||||
\"${_glog_CMake_INSTALLDIR}\")
|
||||
\"\${glog_DATADIR_DESTINATION}\")
|
||||
"
|
||||
COMPONENT Development
|
||||
)
|
||||
|
||||
@ -39,7 +39,6 @@ Marco Wang <m.aesophor@gmail.com>
|
||||
Michael Darr <mdarr@matician.com>
|
||||
Michael Tanner <michael@tannertaxpro.com>
|
||||
MiniLight <MiniLightAR@Gmail.com>
|
||||
Niklas Hambuechen <mail@nh2.me>
|
||||
Peter Collingbourne <pcc@google.com>
|
||||
Rodrigo Queiro <rodrigoq@google.com>
|
||||
romange <romange@users.noreply.github.com>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user