fpc sysroot should belong to user configuration cmake_pascal
authorkoda
Tue, 30 Apr 2013 01:43:00 +0200
branchcmake_pascal
changeset 8863 9774ad4fe170
parent 8859 bead90828a94
child 8866 26424c644306
fpc sysroot should belong to user configuration
cmake_modules/CMakePascalInformation.cmake
hedgewars/CMakeLists.txt
--- a/cmake_modules/CMakePascalInformation.cmake	Tue Mar 26 18:03:15 2013 +0100
+++ b/cmake_modules/CMakePascalInformation.cmake	Tue Apr 30 01:43:00 2013 +0200
@@ -168,10 +168,6 @@
         if(APPLE)
             #add user framework directory
             set(CMAKE_Pascal_UNIX_FLAGS "-Ff~/Library/Frameworks ${CMAKE_Pascal_UNIX_FLAGS}")
-            #when sysroot is set, make sure that fpc picks it
-            if(CMAKE_OSX_SYSROOT)
-                set(CMAKE_Pascal_UNIX_FLAGS "-XD${CMAKE_OSX_SYSROOT} ${CMAKE_Pascal_UNIX_FLAGS}")
-            endif(CMAKE_OSX_SYSROOT)
         endif(APPLE)
     endif(UNIX)
 
--- a/hedgewars/CMakeLists.txt	Tue Mar 26 18:03:15 2013 +0100
+++ b/hedgewars/CMakeLists.txt	Tue Apr 30 01:43:00 2013 +0200
@@ -127,6 +127,11 @@
         list(APPEND HW_LINK_LIBS SDLmain)
         add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH})
     endif()
+
+    #when sysroot is set, make sure that fpc picks it
+    if(CMAKE_OSX_SYSROOT)
+        set(add_flag_append "-XD${CMAKE_OSX_SYSROOT}")
+    endif(CMAKE_OSX_SYSROOT)
 endif(APPLE)
 
 if(FFMPEG_FOUND)