summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-10-01 16:12:15 -0700
committerRussell Belfer <rb@github.com>2013-10-03 10:44:13 -0700
commit219d3457324e8c2652e3462cedaf648912b40281 (patch)
tree4dcd3bd4aa22d5a9827fbc87c52546ce2a2cd7a1 /CMakeLists.txt
parent2fe54afa2a8f87d03d2d550dcde7718f27e40967 (diff)
downloadlibgit2-219d3457324e8c2652e3462cedaf648912b40281.tar.gz
Initial iconv hookup for precomposed unicode
This hooks up git_path_direach and git_path_dirload so that they will take a flag indicating if directory entry names should be tested and converted from decomposed unicode to precomposed form. This code will only come into play on the Apple platform and even then, only when certain types of filesystems are used. This involved adding a flag to these functions which involved changing a lot of places in the code. This was an opportunity to do a bit of code cleanup here and there, for example, getting rid of the git_futils_cleanupdir_r function in favor of a simple flag to git_futils_rmdir_r to not remove the top level entry. That ended up adding depth tracking during rmdir_r which led to a safety check for infinite directory recursion. Yay. This hasn't actually been tested on the Mac filesystems where the issue occurs. I still need to get test environment for that.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index df3936496..62ebbf4e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,7 +58,10 @@ FUNCTION(TARGET_OS_LIBRARIES target)
TARGET_LINK_LIBRARIES(${target} socket nsl)
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
TARGET_LINK_LIBRARIES(${target} rt)
- ENDIF ()
+ ELSEIF(APPLE)
+ TARGET_LINK_LIBRARIES(${target} iconv)
+ ENDIF()
+
IF(THREADSAFE)
TARGET_LINK_LIBRARIES(${target} ${CMAKE_THREAD_LIBS_INIT})
ENDIF()