diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-07-09 13:57:28 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-10-15 18:22:48 +0200 |
commit | a5341a80e29dcd26881a411bb635a97b8cf86433 (patch) | |
tree | 94dedf6024b855f117037d9f7b845644075945e7 /samples.d/config.cmake.sample | |
parent | 6e40c15b5156cdc0e48e470c00e9905d2c8ca46f (diff) |
Use CACHE variable for other common CMAKE variable
This is done to be able to overwite from CLI those variables.
CMAKE_INSTALL_PREFIX is a special case since it is set by default
to '/usr/local' at CMake invocation. So overwriting by CLI is fine
but set it up using config.cmake file not. So since CMake v3.7 there
is a variable to know if this variable has been set by default or not.
Change-Id: I60c5161fa9a4134d100ef709d0966d599871ad44
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'samples.d/config.cmake.sample')
-rw-r--r-- | samples.d/config.cmake.sample | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/samples.d/config.cmake.sample b/samples.d/config.cmake.sample index 55de5c2..d7268cd 100644 --- a/samples.d/config.cmake.sample +++ b/samples.d/config.cmake.sample @@ -76,7 +76,7 @@ set (PKG_REQUIRED_LIST # Prefix path where will be installed the files # Default: /usr/local (need root permission to write in) # ------------------------------------------------------ -#set(CMAKE_INSTALL_PREFIX $ENV{HOME}/opt) +#set(INSTALL_PREFIX /opt/AGL CACHE PATH "INSTALL PREFIX PATH") # Customize link option # ----------------------------- @@ -127,8 +127,8 @@ set (PKG_REQUIRED_LIST # (BUG!!!) as PKG_CONFIG_PATH does not work [should be an env variable] # --------------------------------------------------------------------- -set(CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) -set(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib) +set(CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig CACHE PATH 'Prefix Path list used by pkgconfig module') +set(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib CACHE PATH 'Path list where to search for libraries') # Optional location for config.xml.in # ----------------------------------- |