mirror of
https://gitlab.freedesktop.org/uchardet/uchardet.git
synced 2025-12-06 16:56: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_INCLUDE ${DIR_PREFIX}/include)
|
||||
set (DIR_SHARE ${DIR_PREFIX}/share)
|
||||
set (DIR_BIN ${DIR_PREFIX}/bin)
|
||||
set (DIR_ETC ${DIR_PREFIX}/etc)
|
||||
|
||||
if (DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set (DIR_BIN ${CMAKE_INSTALL_BINDIR})
|
||||
endif (DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set (CMAKE_INSTALL_BINDIR bin
|
||||
CACHE STRING "Install location of executables")
|
||||
|
||||
if (DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set (DIR_LIBRARY ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
@ -108,7 +108,7 @@ install(
|
||||
TARGETS
|
||||
${UCHARDET_TARGET}
|
||||
RUNTIME DESTINATION
|
||||
${DIR_BIN}
|
||||
${CMAKE_INSTALL_BINDIR}
|
||||
ARCHIVE DESTINATION
|
||||
${DIR_LIBRARY}
|
||||
)
|
||||
|
||||
@ -18,6 +18,6 @@ install(
|
||||
uchardet
|
||||
RUNTIME
|
||||
DESTINATION
|
||||
${DIR_BIN}
|
||||
${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user