CMakeLists.txt
changeset 8283 af97cdbb7713
parent 8279 c03d64969112
child 8304 620560c89284
child 8313 31d6613989a6
--- a/CMakeLists.txt	Sun Dec 09 16:13:06 2012 +0100
+++ b/CMakeLists.txt	Sun Dec 09 18:00:01 2012 +0100
@@ -194,7 +194,16 @@
     endif()
 endif()
 
-set(pascal_flags ${fpflags_parsed} "-vm4079,4080,4081" "-B" "-FE${PROJECT_BINARY_DIR}/bin" "-Cs2000000" "-vewnq" "-dDEBUGFILE" ${pascal_flags})
+set(pascal_flags ${fpflags_parsed}              # user flags
+                 "-vm4079,4080,4081"            # fpc output format
+                 "-B"                           # compile all units
+                 "-FE${PROJECT_BINARY_DIR}/bin" # fpc output directory
+                 "-Fl${PROJECT_BINARY_DIR}/bin" # fpc linking directory
+                 "-Cs2000000"                   # stack size
+                 "-vewnq"                       # fpc output verbosity
+                 "-dDEBUGFILE"                  # macro for engine output
+                 ${pascal_flags}                # adding to list
+                 )
 set(haskell_flags "-O2" ${ghflags_parsed} ${haskell_flags})
 
 #get BUILD_TYPE and enable/disable optimisation
@@ -257,12 +266,16 @@
 endif()
 
 
+#physfs library (static on unix, dll on win32)
+add_subdirectory(misc/physfs)
+if(NOT WIN32)
+    set(pascal_flags "-k${LIBRARY_OUTPUT_PATH}/libphysfs.a" ${pascal_flags})
+endif()
+
+
 #main engine
 add_subdirectory(hedgewars)
 
-#physfs library
-add_subdirectory(misc/physfs)
-
 #Android related build scripts
 if(ANDROID)
     #run cmake -DANDROID=1 to enable this