mirror of
https://gitlab.freedesktop.org/uchardet/uchardet.git
synced 2025-12-07 01:06:40 +08:00
CMake: Use only CMAKE_INSTALL_BINDIR instead of DIR_BIN
This way it always shows up in ccmake, even if not defined.
A string is used instead of path because I personally think it makes more
sense in the following use-cases:
STRING:
-DCMAKE_INSTALL_PREFIX=/home/user -DCMAKE_INSTALL_BINDIR=bins
installs everything to /home/user/{lib,etc,share,(...)} and executables to
${CMAKE_INSTALL_PREFIX}/bins
-DCMAKE_INSTALL_PREFIX=/home/user -DCMAKE_INSTALL_BINDIR=/opt/bin
everything to /home/user/{lib,etc,share,(...)} and executables to
/opt/bin
PATH:
-DCMAKE_INSTALL_PREFIX=/home/user -DCMAKE_INSTALL_BINDIR=bins
everything to /home/user/{lib,etc,share,(...)} and executables to
$(pwd)/bins (!)
-DCMAKE_INSTALL_PREFIX=/home/user -DCMAKE_INSTALL_BINDIR=/opt/bin
same as STRING
This commit is contained in:
parent
50b2e0802f
commit
81ed86a26b
@ -34,12 +34,10 @@ set (DIR_LIBRARY ${DIR_PREFIX}/${CMAKE_SHARED_LIBRARY_PREFIX})
|
|||||||
set (DIR_LIBRARY_STATIC ${DIR_PREFIX}/${CMAKE_STATIC_LIBRARY_PREFIX})
|
set (DIR_LIBRARY_STATIC ${DIR_PREFIX}/${CMAKE_STATIC_LIBRARY_PREFIX})
|
||||||
set (DIR_INCLUDE ${DIR_PREFIX}/include)
|
set (DIR_INCLUDE ${DIR_PREFIX}/include)
|
||||||
set (DIR_SHARE ${DIR_PREFIX}/share)
|
set (DIR_SHARE ${DIR_PREFIX}/share)
|
||||||
set (DIR_BIN ${DIR_PREFIX}/bin)
|
|
||||||
set (DIR_ETC ${DIR_PREFIX}/etc)
|
set (DIR_ETC ${DIR_PREFIX}/etc)
|
||||||
|
|
||||||
if (DEFINED CMAKE_INSTALL_BINDIR)
|
set (CMAKE_INSTALL_BINDIR bin
|
||||||
set (DIR_BIN ${CMAKE_INSTALL_BINDIR})
|
CACHE STRING "Install location of executables")
|
||||||
endif (DEFINED CMAKE_INSTALL_BINDIR)
|
|
||||||
|
|
||||||
if (DEFINED CMAKE_INSTALL_LIBDIR)
|
if (DEFINED CMAKE_INSTALL_LIBDIR)
|
||||||
set (DIR_LIBRARY ${CMAKE_INSTALL_LIBDIR})
|
set (DIR_LIBRARY ${CMAKE_INSTALL_LIBDIR})
|
||||||
|
|||||||
@ -108,7 +108,7 @@ install(
|
|||||||
TARGETS
|
TARGETS
|
||||||
${UCHARDET_TARGET}
|
${UCHARDET_TARGET}
|
||||||
RUNTIME DESTINATION
|
RUNTIME DESTINATION
|
||||||
${DIR_BIN}
|
${CMAKE_INSTALL_BINDIR}
|
||||||
ARCHIVE DESTINATION
|
ARCHIVE DESTINATION
|
||||||
${DIR_LIBRARY}
|
${DIR_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -18,6 +18,6 @@ install(
|
|||||||
uchardet
|
uchardet
|
||||||
RUNTIME
|
RUNTIME
|
||||||
DESTINATION
|
DESTINATION
|
||||||
${DIR_BIN}
|
${CMAKE_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user