fix compiling on osx when you have multiple linkers installed
authorkoda
Wed, 20 Feb 2013 01:55:23 +0100
changeset 8518 24d2bdc6deff
parent 8517 648bb1cb7ebc
child 8520 1dedcc37bfe8
child 8535 6652a8c8ce89
fix compiling on osx when you have multiple linkers installed
hedgewars/CMakeLists.txt
--- a/hedgewars/CMakeLists.txt	Tue Feb 19 22:03:33 2013 +0400
+++ b/hedgewars/CMakeLists.txt	Wed Feb 20 01:55:23 2013 +0100
@@ -146,6 +146,10 @@
 
         list(APPEND pascal_flags "-k${SDLMAIN_LIB}")
     endif()
+
+    #when you have multiple ld installation make sure you get the one bundled with the compiler
+    get_filename_component(compiler_dir ${CMAKE_C_COMPILER} PATH)
+    list(APPEND pascal_flags "-FD${compiler_dir}")
 endif(APPLE)
 
 if(NOT NOPNG)