summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
-rw-r--r--docs/dev_guide/1_Quickstart.md10
-rw-r--r--docs/samples.d/CMakeLists.txt.sample (renamed from src/samples.d/CMakeLists.txt.sample)0
-rw-r--r--docs/samples.d/config.cmake.sample (renamed from src/samples.d/config.cmake.sample)0
-rw-r--r--docs/samples.d/config.xml.in.sample (renamed from src/samples.d/config.xml.in.sample)0
-rw-r--r--docs/samples.d/xds-config.env.sample (renamed from src/samples.d/xds-config.env.sample)0
-rw-r--r--packaging/rpm/agl-cmake-apps-module.spec8
7 files changed, 13 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e9ca3f1..2fd3bbc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,14 +18,14 @@
cmake_minimum_required(VERSION 3.5)
+project(CMakeAfbTemplates)
+
# compute the default install directory
include(GNUInstallDirs)
get_filename_component(CMAKE_DIR ${CMAKE_ROOT} NAME)
-set(DEFAULT_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/${CMAKE_DIR}/Modules)
-
-# set the install directory, allowing its overwriting
-set(INSTALL_DIR ${DEFAULT_INSTALL_DIR} CACHE PATH "Installation directory")
+set(INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/${CMAKE_DIR}/Modules)
# install the module
INSTALL(FILES CMakeAfbTemplates.cmake DESTINATION ${INSTALL_DIR})
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/ DESTINATION ${INSTALL_DIR}/CMakeAfbTemplates)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/docs/ DESTINATION ${CMAKE_INSTALL_DOCDIR})
diff --git a/docs/dev_guide/1_Quickstart.md b/docs/dev_guide/1_Quickstart.md
index c9f3897..30af4f2 100644
--- a/docs/dev_guide/1_Quickstart.md
+++ b/docs/dev_guide/1_Quickstart.md
@@ -7,10 +7,7 @@ using **cmake module** then use `config.cmake` file to configure your project sp
```bash
mkdir -p conf.d/cmake
-# RPM based distribution
-cp /usr/share/cmake/Modules/CMakeAfbTemplates/samples.d/config.cmake.sample conf.d/cmake/config.cmake
-# DEB based distribution with X.Y as cmake version
-cp /usr/share/cmake-X.Y/Modules/CMakeAfbTemplates/samples.d/config.cmake.sample conf.d/cmake/config.cmake
+cp /usr/share/doc/CMakeAfbTemplates/samples.d/config.cmake.sample conf.d/cmake/config.cmake
```
Edit the copied config.cmake file to fit your needs.
@@ -20,10 +17,7 @@ Now, create your top CMakeLists.txt file which include `config.cmake` file.
An example is available in the **cmake module** that you can copy and use:
```bash
-# RPM based distribution
-cp /usr/share/cmake/Modules/CMakeAfbTemplates/samples.d/CMakeLists.txt.sample CMakeLists.txt
-# DEB based distribution with X.Y as cmake version
-cp /usr/share/cmake-X.Y/Modules/CMakeAfbTemplates/samples.d/CMakeLists.txt.sample CMakeLists.txt
+cp /usr/share/doc/CMakeAfbTemplates/samples.d/CMakeLists.txt.sample CMakeLists.txt
```
## Auto-detection of CMakeLists.txt and *.cmake files
diff --git a/src/samples.d/CMakeLists.txt.sample b/docs/samples.d/CMakeLists.txt.sample
index b485097..b485097 100644
--- a/src/samples.d/CMakeLists.txt.sample
+++ b/docs/samples.d/CMakeLists.txt.sample
diff --git a/src/samples.d/config.cmake.sample b/docs/samples.d/config.cmake.sample
index 7f58d07..7f58d07 100644
--- a/src/samples.d/config.cmake.sample
+++ b/docs/samples.d/config.cmake.sample
diff --git a/src/samples.d/config.xml.in.sample b/docs/samples.d/config.xml.in.sample
index b93f3d9..b93f3d9 100644
--- a/src/samples.d/config.xml.in.sample
+++ b/docs/samples.d/config.xml.in.sample
diff --git a/src/samples.d/xds-config.env.sample b/docs/samples.d/xds-config.env.sample
index a4c51b1..a4c51b1 100644
--- a/src/samples.d/xds-config.env.sample
+++ b/docs/samples.d/xds-config.env.sample
diff --git a/packaging/rpm/agl-cmake-apps-module.spec b/packaging/rpm/agl-cmake-apps-module.spec
index 950514c..3124f97 100644
--- a/packaging/rpm/agl-cmake-apps-module.spec
+++ b/packaging/rpm/agl-cmake-apps-module.spec
@@ -33,7 +33,7 @@ framework binder apps.
%build
[ ! -d build ] && mkdir build
cd build
-cmake ..
+cmake -DCMAKE_INSTALL_PREFIX=/usr ..
%install
[ -d build ] && cd build
@@ -42,8 +42,14 @@ cmake ..
%files
%defattr(-,root,root)
%dir %{_datadir}/cmake/Modules/
+%dir %{_defaultdocdir}/CMakeAfbTemplates/
%{_datadir}/cmake/Modules/*
+%{_defaultdocdir}/CMakeAfbTemplates/*
%changelog
+* Wed Dec 12 2018 Romain
+- Separation of docs files at installation
+- Fix the install prefix at build time
+
* Thu Nov 5 2018 Romain
- initial creation