Fix build breaks on file insensitive system

Current we use 'A'rmNNQuantizer name for  executable
and 'a'rmNNQuantizer as library name.
Since cmake does not allow same name for executable and library.
The old way is to use a captial letter for the executable name.
But it will create a problem on system (like macosx) that the file
system is case insensitive by default. Since it will create/overwritten
file on the same folder during the cmake build which makes build failed
when BUILD_ARMNN_QUANTIZER is enabled.

Fixed this by using ArmNNQuantizerMain as the executable
name during build, then rename it back to ArmNNQuantizer using
set_target_property OUTPUT_NAME function.

Signed-off-by: Keith Mok <ek9852@gmail.com>
Change-Id: I3e0779770c851c0eb6804e300a24836be955d07a
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 763c010..2eb0263 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -199,13 +199,18 @@
 
     target_link_libraries(armnnQuantizer armnn)
 
-    add_executable_ex(ArmnnQuantizer
+    add_executable_ex(ArmnnQuantizerMain
         src/armnnQuantizer/ArmNNQuantizerMain.cpp)
 
-    target_include_directories(ArmnnQuantizer PRIVATE include/armnnDeserializer)
-    target_include_directories(ArmnnQuantizer PRIVATE src/armnn)
+    # cmake does not allow same executable and library name
+    # workaround that by rename that using set_target_properties
+    set_target_properties(ArmnnQuantizerMain
+        PROPERTIES OUTPUT_NAME ArmnnQuantizer)
 
-    target_link_libraries(ArmnnQuantizer
+    target_include_directories(ArmnnQuantizerMain PRIVATE include/armnnDeserializer)
+    target_include_directories(ArmnnQuantizerMain PRIVATE src/armnn)
+
+    target_link_libraries(ArmnnQuantizerMain
             armnnQuantizer
             armnnSerializer
             armnn
@@ -213,7 +218,7 @@
             ${FLATBUFFERS_LIBRARY})
 
     if(Threads_FOUND AND (NOT ("${CMAKE_SYSTEM_NAME}" STREQUAL Android)))
-        target_link_libraries(ArmnnQuantizer pthread)
+        target_link_libraries(ArmnnQuantizerMain pthread)
     endif()
 
     set_target_properties(armnnQuantizer PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
@@ -1188,4 +1193,4 @@
 ## Build Python bindings
 if (BUILD_PYTHON_WHL OR BUILD_PYTHON_SRC)
     add_subdirectory(python/pyarmnn)
-endif()
\ No newline at end of file
+endif()