--- src/CMakeLists.txt.orig	2011-12-31 16:26:35.723358998 +0000
+++ src/CMakeLists.txt	2011-12-31 16:33:29.301851516 +0000
@@ -5,9 +5,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} 
 option(BUILD_WERROR "Build with -Werror" ON)
 
 if(BUILD_WERROR)
-  if (LINUX)
+  if (LINUX AND NOT APPLE)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
-  endif (LINUX)
+  endif (LINUX AND NOT APPLE)
 endif(BUILD_WERROR)
 
 include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
@@ -1073,15 +1073,15 @@ if (WIN32)
   )
 endif (WIN32)
 
-if (LINUX)
+if (UNIX AND NOT APPLE)
   # Hack: the Gold linker pays attention to the order that libraries are
   # specified on the link line.  -lX11 and -ldl are provided earlier in the link
   # command but they're actually used by libraries that appear after them, so
   # they end up getting ignored.  This appends them to the very end of the link
   # line, ensuring they're always used.
   find_package(X11)
-  target_link_libraries(clementine_lib ${X11_X11_LIB} ${CMAKE_DL_LIBS})
-endif (LINUX)
+  target_link_libraries(clementine_lib ${X11_X11_LIB})
+endif (UNIX AND NOT APPLE)
 
 add_dependencies(clementine_lib qtsingleapplication)
 
@@ -1108,6 +1108,7 @@ add_executable(clementine
   ${CLEMENTINE-WIN32-RESOURCES}
   main.cpp
 )
+set_target_properties(clementine PROPERTIES OUTPUT_NAME clementine-player)
 target_link_libraries(clementine
   clementine_lib
 )
