mirror of
https://gitlab.freedesktop.org/uchardet/uchardet.git
synced 2025-12-13 07:00:06 +08:00
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
24 lines
226 B
CMake
24 lines
226 B
CMake
set(
|
|
UCHARDET_SOURCES
|
|
uchardet.cpp
|
|
)
|
|
|
|
add_executable(
|
|
uchardet
|
|
${UCHARDET_SOURCES}
|
|
)
|
|
|
|
target_link_libraries(
|
|
uchardet
|
|
${UCHARDET_TARGET}
|
|
)
|
|
|
|
install(
|
|
TARGETS
|
|
uchardet
|
|
RUNTIME
|
|
DESTINATION
|
|
${CMAKE_INSTALL_BINDIR}
|
|
)
|
|
|