CMakeLists.txt
changeset 8283 af97cdbb7713
parent 8279 c03d64969112
child 8304 620560c89284
child 8313 31d6613989a6
equal deleted inserted replaced
8281:a1577759bf62 8283:af97cdbb7713
   192         separate_arguments(fpflags_parsed UNIX_COMMAND ${FPFLAGS})
   192         separate_arguments(fpflags_parsed UNIX_COMMAND ${FPFLAGS})
   193         separate_arguments(ghflags_parsed UNIX_COMMAND ${GHFLAGS})
   193         separate_arguments(ghflags_parsed UNIX_COMMAND ${GHFLAGS})
   194     endif()
   194     endif()
   195 endif()
   195 endif()
   196 
   196 
   197 set(pascal_flags ${fpflags_parsed} "-vm4079,4080,4081" "-B" "-FE${PROJECT_BINARY_DIR}/bin" "-Cs2000000" "-vewnq" "-dDEBUGFILE" ${pascal_flags})
   197 set(pascal_flags ${fpflags_parsed}              # user flags
       
   198                  "-vm4079,4080,4081"            # fpc output format
       
   199                  "-B"                           # compile all units
       
   200                  "-FE${PROJECT_BINARY_DIR}/bin" # fpc output directory
       
   201                  "-Fl${PROJECT_BINARY_DIR}/bin" # fpc linking directory
       
   202                  "-Cs2000000"                   # stack size
       
   203                  "-vewnq"                       # fpc output verbosity
       
   204                  "-dDEBUGFILE"                  # macro for engine output
       
   205                  ${pascal_flags}                # adding to list
       
   206                  )
   198 set(haskell_flags "-O2" ${ghflags_parsed} ${haskell_flags})
   207 set(haskell_flags "-O2" ${ghflags_parsed} ${haskell_flags})
   199 
   208 
   200 #get BUILD_TYPE and enable/disable optimisation
   209 #get BUILD_TYPE and enable/disable optimisation
   201 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration")
   210 message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration")
   202 if(CMAKE_BUILD_TYPE MATCHES "DEBUG")
   211 if(CMAKE_BUILD_TYPE MATCHES "DEBUG")
   255     #linking with liblua.a requires system readline
   264     #linking with liblua.a requires system readline
   256     set(pascal_flags "-k${EXECUTABLE_OUTPUT_PATH}/lib${LUA_LIBRARY}.a" "-k-lreadline" ${pascal_flags})
   265     set(pascal_flags "-k${EXECUTABLE_OUTPUT_PATH}/lib${LUA_LIBRARY}.a" "-k-lreadline" ${pascal_flags})
   257 endif()
   266 endif()
   258 
   267 
   259 
   268 
       
   269 #physfs library (static on unix, dll on win32)
       
   270 add_subdirectory(misc/physfs)
       
   271 if(NOT WIN32)
       
   272     set(pascal_flags "-k${LIBRARY_OUTPUT_PATH}/libphysfs.a" ${pascal_flags})
       
   273 endif()
       
   274 
       
   275 
   260 #main engine
   276 #main engine
   261 add_subdirectory(hedgewars)
   277 add_subdirectory(hedgewars)
   262 
       
   263 #physfs library
       
   264 add_subdirectory(misc/physfs)
       
   265 
   278 
   266 #Android related build scripts
   279 #Android related build scripts
   267 if(ANDROID)
   280 if(ANDROID)
   268     #run cmake -DANDROID=1 to enable this
   281     #run cmake -DANDROID=1 to enable this
   269     add_subdirectory(project_files/Android-build)
   282     add_subdirectory(project_files/Android-build)