CMakeLists.txt
changeset 11654 870f22de388b
parent 11402 bea08a303cb7
child 11659 71bdf987e41f
equal deleted inserted replaced
11653:ef625fe6eaaa 11654:870f22de388b
    39 option(MINIMAL_FLAGS "Respect system flags as much as possible (off)" OFF)
    39 option(MINIMAL_FLAGS "Respect system flags as much as possible (off)" OFF)
    40 option(NOAUTOUPDATE "Disable OS X Sparkle update checking (off)" OFF)
    40 option(NOAUTOUPDATE "Disable OS X Sparkle update checking (off)" OFF)
    41 option(SKIPBUNDLE "Do not create relocate bundle (off)" OFF)
    41 option(SKIPBUNDLE "Do not create relocate bundle (off)" OFF)
    42 
    42 
    43 option(BUILD_ENGINE_C "Compile hwengine as native C (off)" OFF)
    43 option(BUILD_ENGINE_C "Compile hwengine as native C (off)" OFF)
       
    44 option(BUILD_ENGINE_JS "Compile hwengine as javascript (off)" OFF)
    44 option(GL2 "Enable OpenGL 2 rendering !!!EXPERIMENTAL - DO NOT USE!!! [default: off)" OFF)
    45 option(GL2 "Enable OpenGL 2 rendering !!!EXPERIMENTAL - DO NOT USE!!! [default: off)" OFF)
    45 
    46 
    46 set(GHFLAGS "" CACHE STRING "Additional Haskell flags")
    47 set(GHFLAGS "" CACHE STRING "Additional Haskell flags")
    47 if(UNIX AND NOT APPLE)
    48 if(UNIX AND NOT APPLE)
    48     set(DATA_INSTALL_DIR "share/hedgewars" CACHE STRING "Resource folder path")
    49     set(DATA_INSTALL_DIR "share/hedgewars" CACHE STRING "Resource folder path")
   223     add_subdirectory(tools/pas2c)
   224     add_subdirectory(tools/pas2c)
   224     add_subdirectory(project_files/hwc)
   225     add_subdirectory(project_files/hwc)
   225 else()
   226 else()
   226     #main pascal engine
   227     #main pascal engine
   227     add_subdirectory(hedgewars)
   228     add_subdirectory(hedgewars)
       
   229     if(BUILD_ENGINE_JS)
       
   230         message(FATAL_ERROR "This option needs BUILD_ENGINE_C to be set")
       
   231     endif()
   228 endif()
   232 endif()
   229 
   233 
   230 #Android related build scripts
   234 #Android related build scripts
   231 #TODO: when ANDROID, BUILD_ENGINE_LIBRARY should be set
   235 #TODO: when ANDROID, BUILD_ENGINE_LIBRARY should be set
   232 if(ANDROID)
   236 if(ANDROID)