[uchardet: 22/29] cmake: hardcode less



commit 29f18210b11d01087426ed137f675dbbd584365a
Author: Ilya Tumaykin <itumaykin gmail com>
Date:   Mon Mar 21 21:13:51 2016 +0300

    cmake: hardcode less

 src/CMakeLists.txt       |    4 ++--
 src/tools/CMakeLists.txt |    8 +++++---
 test/CMakeLists.txt      |    2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 627fc41..f6be76f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -73,7 +73,7 @@ set_target_properties(
                LINKER_LANGUAGE
                        CXX
                OUTPUT_NAME
-                       uchardet
+                       ${PACKAGE_NAME}
                VERSION
                        0.0.0
                SOVERSION
@@ -87,7 +87,7 @@ if (UCHARDET_STATIC_LIBRARY)
                        LINKER_LANGUAGE
                                CXX
                        OUTPUT_NAME
-                               uchardet
+                               ${PACKAGE_NAME}
        )
 endif (UCHARDET_STATIC_LIBRARY)
 
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index 10dd604..fa15eb2 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -3,19 +3,21 @@ set(
        uchardet.cpp
 )
 
+set(UCHARDET_BINARY uchardet)
+
 add_executable(
-       uchardet
+       ${UCHARDET_BINARY}
        ${UCHARDET_SOURCES}
 )
 
 target_link_libraries(
-       uchardet
+       ${UCHARDET_BINARY}
        ${UCHARDET_LIBRARY}
 )
 
 install(
        TARGETS
-               uchardet
+               ${UCHARDET_BINARY}
        RUNTIME DESTINATION
                ${CMAKE_INSTALL_BINDIR}
 )
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index c9663bd..a059044 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -10,7 +10,7 @@ add_executable(
 
 target_link_libraries(
        uchardet-tests
-       libuchardet
+       ${UCHARDET_LIBRARY}
 )
 
 set_target_properties(


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]