Advertisement
srijannr1

love2d build scropt

Apr 14th, 2021
406
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #
  2. # Copyright (c) 2006-2021 LOVE Development Team
  3. #
  4. # This software is provided 'as-is', without any express or implied
  5. # warranty.  In no event will the authors be held liable for any damages
  6. # arising from the use of this software.
  7. #
  8. # Permission is granted to anyone to use this software for any purpose,
  9. # including commercial applications, and to alter it and redistribute it
  10. # freely, subject to the following restrictions:
  11. #
  12. # 1. The origin of this software must not be misrepresented; you must not
  13. #    claim that you wrote the original software. If you use this software
  14. #    in a product, an acknowledgment in the product documentation would be
  15. #    appreciated but is not required.
  16. # 2. Altered source versions must be plainly marked as such, and must not be
  17. #    misrepresented as being the original software.
  18. # 3. This notice may not be removed or altered from any source distribution.
  19. #
  20.  
  21. if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
  22.     # Protip: run cmake like this: cmake -G "<generator>" -H. -Bbuild
  23.     message(FATAL_ERROR "Prevented in-tree build.")
  24. endif()
  25.  
  26. cmake_minimum_required(VERSION 3.1)
  27.  
  28. project(love)
  29.  
  30. set(LOVE_EXE_NAME love)
  31. set(LOVE_LIB_NAME liblove)
  32.  
  33. set(CMAKE_MODULE_PATH "${love_SOURCE_DIR}/extra/cmake" ${CMAKE_MODULE_PATH})
  34. # Needed for shared libs on Linux. (-fPIC).
  35. set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
  36.  
  37. set (CMAKE_CXX_STANDARD 11)
  38.  
  39. if(MSVC)
  40.     set(LOVE_CONSOLE_EXE_NAME lovec)
  41. endif()
  42.  
  43. if(CMAKE_SIZEOF_VOID_P EQUAL 8)
  44.     set(LOVE_X64 TRUE)
  45.     set(LOVE_TARGET_PLATFORM x64)
  46. else()
  47.     set(LOVE_X86 TRUE)
  48.     set(LOVE_TARGET_PLATFORM x86)
  49. endif()
  50.  
  51. option(LOVE_JIT "Use LuaJIT" FALSE)
  52. option(LOVE_MPG123 "Use mpg123" TRUE)
  53.  
  54. if(LOVE_JIT)
  55.     if(APPLE)
  56.         message(FATAL_ERROR "JIT not supported yet on Mac. Please use -DLOVE_JIT=0.")
  57.     endif()
  58.     message(STATUS "LuaJIT: Enabled")
  59. else()
  60.     message(STATUS "LuaJIT: Disabled")
  61. endif()
  62.  
  63. if(NOT LOVE_MPG123)
  64.     add_definitions(-DLOVE_NOMPG123)
  65. endif()
  66.  
  67. message(STATUS "Target platform: ${LOVE_TARGET_PLATFORM}")
  68.  
  69. if(POLICY CMP0072)
  70.     cmake_policy(SET CMP0072 NEW)
  71. endif()
  72.  
  73. find_package(OpenGL)
  74.  
  75. if(MEGA)
  76.     # LOVE_MSVC_DLLS contains runtime DLLs that should be bundled with the love
  77.     # binary (in e.g. the installer). Example: msvcp140.dll.
  78.     set(LOVE_MSVC_DLLS ${MEGA_MSVC_DLLS})
  79.  
  80.     # LOVE_INCLUDE_DIRS contains the search directories for #include. It's mostly
  81.     # not needed for MEGA builds, since almost all the libraries (except LuaJIT)
  82.     # are CMake targets, causing include paths to be added automatically.
  83.     set(LOVE_INCLUDE_DIRS)
  84.  
  85.     if(APPLE)
  86.         # Some files do #include <SDL2/SDL.h>, but building with megasource
  87.         # requires #include <SDL.h>.
  88.         add_definitions(-DLOVE_MACOSX_SDL_DIRECT_INCLUDE)
  89.     endif ()
  90.  
  91.     # SDL2 links with some DirectX libraries, and we apparently also
  92.     # pull those libraries in for linkage because we link with SDL2.
  93.     set(LOVE_LINK_DIRS ${SDL_LINK_DIR})
  94.  
  95.     set(LOVE_LINK_LIBRARIES
  96.         ${OPENGL_gl_LIBRARY}
  97.         ${MEGA_FREETYPE}
  98.         ${MEGA_LIBOGG}
  99.         ${MEGA_LIBVORBISFILE}
  100.         ${MEGA_LIBVORBIS}
  101.         ${MEGA_LIBTHEORA}
  102.         ${MEGA_MODPLUG}
  103.         ${MEGA_OPENAL}
  104.         ${MEGA_SDL2MAIN}
  105.         ${MEGA_SDL2}
  106.         ${MEGA_ZLIB}
  107.     )
  108.  
  109.     # These DLLs are moved next to the love binary in a post-build step to
  110.     # love runnable from inside Visual Studio.
  111.     #
  112.     # LOVE_MOVE_DLLS can contain CMake targets, in which case the target's
  113.     # output is assumed to be a DLL, or it can contain paths to actual files.
  114.     # We detect whether or not each item is a target, and take the appropriate
  115.     # action.
  116.     set(LOVE_MOVE_DLLS
  117.         ${MEGA_SDL2}
  118.         ${MEGA_OPENAL}
  119.     )
  120.  
  121.     if(LOVE_MPG123)
  122.         set(LOVE_LINK_LIBRARIES
  123.             ${LOVE_LINK_LIBRARIES}
  124.             ${MEGA_MPEG123}
  125.         )
  126.         set(LOVE_MOVE_DLLS
  127.             ${LOVE_MOVE_DLLS}
  128.             ${MEGA_MPEG123}
  129.         )
  130.     endif()
  131.  
  132.     if(LOVE_JIT)
  133.         set(LOVE_LUA_LIBRARY ${MEGA_LUAJIT_LIB})
  134.         # LOVE_EXTRA_DLLS are non-runtime DLLs which should be bundled with the
  135.         # love binary in installers, etc. It's only needed for external
  136.         # (non-CMake) targets, i.e. LuaJIT.
  137.         set(LOVE_EXTRA_DLLS ${MEGA_LUAJIT_DLL})
  138.         set(LOVE_EXTRA_DEPENDECIES luajit)
  139.  
  140.         set(LOVE_INCLUDE_DIRS
  141.             ${LOVE_INCLUDE_DIRS}
  142.             ${MEGA_LUAJIT_INCLUDE}
  143.         )
  144.         set(LOVE_LINK_LIBRARIES
  145.             ${LOVE_LINK_LIBRARIES}
  146.             ${LOVE_LUA_LIBRARY}
  147.         )
  148.         set(LOVE_MOVE_DLLS
  149.             ${LOVE_MOVE_DLLS}
  150.             ${MEGA_LUAJIT_DLL}
  151.         )
  152.     else()
  153.         set(LOVE_LUA_LIBRARY ${MEGA_LUA51})
  154.  
  155.         set(LOVE_LINK_LIBRARIES
  156.             ${LOVE_LINK_LIBRARIES}
  157.             ${LOVE_LUA_LIBRARY}
  158.         )
  159.         set(LOVE_MOVE_DLLS
  160.             ${LOVE_MOVE_DLLS}
  161.             ${LOVE_LUA_LIBRARY}
  162.         )
  163.         # MEGA_LUA51 is a CMake target, so includes are handled
  164.         # automatically.
  165.     endif()
  166. else()
  167.     if(MSVC)
  168.         message(FATAL_ERROR "
  169. It is currently only possible to build with megasource on Windows.
  170. Please see http://bitbucket.org/rude/megasource
  171. ")
  172.     endif()
  173.  
  174.     find_package(Freetype REQUIRED)
  175.     find_package(ModPlug REQUIRED)
  176.     find_package(OpenAL REQUIRED)
  177.     find_package(OpenGL REQUIRED)
  178.     find_package(SDL2 REQUIRED)
  179.     find_package(Theora REQUIRED)
  180.     find_package(Vorbis REQUIRED)
  181.     find_package(ZLIB REQUIRED)
  182.     find_package(Ogg REQUIRED)
  183.  
  184.     # required for enet
  185.     add_definitions(-D HAS_SOCKLEN_T)
  186.  
  187.     set(LOVE_INCLUDE_DIRS
  188.         ${SDL2_INCLUDE_DIR}
  189.         ${FREETYPE_INCLUDE_DIRS}
  190.         ${VORBIS_INCLUDE_DIR}
  191.         ${OPENAL_INCLUDE_DIR}
  192.         ${ZLIB_INCLUDE_DIRS}
  193.         ${MODPLUG_INCLUDE_DIR}
  194.         ${OGG_INCLUDE_DIR}
  195.         ${THEORA_INCLUDE_DIR}
  196.     )
  197.  
  198.     set(LOVE_LINK_LIBRARIES
  199.         ${OPENGL_gl_LIBRARY}
  200.         ${SDL2_LIBRARY}
  201.         ${FREETYPE_LIBRARY}
  202.         ${OPENAL_LIBRARY}
  203.         ${MODPLUG_LIBRARY}
  204.         ${THEORA_LIBRARY}
  205.         ${THEORADEC_LIBRARY}
  206.         ${VORBISFILE_LIBRARY}
  207.         ${LOVE_LUA_LIBRARY}
  208.         ${OGG_LIBRARY}
  209.         ${ZLIB_LIBRARY}
  210.     )
  211.  
  212.     if(LOVE_MPG123)
  213.         find_package(MPG123 REQUIRED)
  214.         set(LOVE_LINK_LIBRARIES
  215.             ${LOVE_LINK_LIBRARIES}
  216.             ${MPG123_LIBRARY}
  217.         )
  218.         set(LOVE_INCLUDE_DIRS
  219.             ${LOVE_INCLUDE_DIRS}
  220.             ${MPG123_INCLUDE_DIR}
  221.         )
  222.     endif()
  223.  
  224.     if(LOVE_JIT)
  225.         find_package(LuaJIT REQUIRED)
  226.         set(LOVE_LUA_LIBRARY ${LUAJIT_LIBRARY})
  227.         set(LOVE_LUA_INCLUDE_DIR ${LUAJIT_INCLUDE_DIR})
  228.     else()
  229.         find_package(Lua51 REQUIRED)
  230.         set(LOVE_LUA_LIBRARY ${LUA_LIBRARY})
  231.         set(LOVE_LUA_INCLUDE_DIR ${LUA_INCLUDE_DIR})
  232.     endif()
  233.  
  234.     set(LOVE_INCLUDE_DIRS
  235.         ${LOVE_INCLUDE_DIRS}
  236.         ${LOVE_LUA_INCLUDE_DIR}
  237.     )
  238.     set(LOVE_LINK_LIBRARIES
  239.         ${LOVE_LINK_LIBRARIES}
  240.         ${LOVE_LUA_LIBRARY}
  241.     )
  242.  
  243. endif()
  244.  
  245. ###
  246. ### No Megasource-specific stuff beyond this point!
  247. ###
  248.  
  249. if(MSVC)
  250.     set(DISABLE_WARNING_FLAG -W0)
  251. else()
  252.     set(DISABLE_WARNING_FLAG -w)
  253. endif()
  254.  
  255. function(love_disable_warnings ARG_TARGET)
  256.     get_target_property(OLD_FLAGS ${ARG_TARGET} COMPILE_FLAGS)
  257.     set(NEW_FLAGS ${DISABLE_WARNING_FLAG})
  258.     if(OLD_FLAGS)
  259.         set(NEW_FLAGS "${OLD_FLAGS} ${NEW_FLAGS}")
  260.     endif()
  261.     set_target_properties(${ARG_TARGET} PROPERTIES COMPILE_FLAGS ${NEW_FLAGS})
  262. endfunction()
  263.  
  264. #
  265. # common
  266. #
  267.  
  268. set(LOVE_SRC_COMMON
  269.     src/common/b64.cpp
  270.     src/common/b64.h
  271.     src/common/Color.h
  272.     src/common/config.h
  273.     src/common/Data.cpp
  274.     src/common/Data.h
  275.     src/common/delay.cpp
  276.     src/common/delay.h
  277.     src/common/deprecation.cpp
  278.     src/common/deprecation.h
  279.     src/common/EnumMap.h
  280.     src/common/Exception.cpp
  281.     src/common/Exception.h
  282.     src/common/floattypes.cpp
  283.     src/common/floattypes.h
  284.     src/common/int.h
  285.     src/common/math.h
  286.     src/common/Matrix.cpp
  287.     src/common/Matrix.h
  288.     src/common/memory.cpp
  289.     src/common/memory.h
  290.     src/common/Module.cpp
  291.     src/common/Module.h
  292.     src/common/Object.cpp
  293.     src/common/Object.h
  294.     src/common/Optional.h
  295.     src/common/pixelformat.cpp
  296.     src/common/pixelformat.h
  297.     src/common/Reference.cpp
  298.     src/common/Reference.h
  299.     src/common/runtime.cpp
  300.     src/common/runtime.h
  301.     src/common/Stream.cpp
  302.     src/common/Stream.h
  303.     src/common/StringMap.cpp
  304.     src/common/StringMap.h
  305.     src/common/types.cpp
  306.     src/common/types.h
  307.     src/common/utf8.cpp
  308.     src/common/utf8.h
  309.     src/common/Variant.cpp
  310.     src/common/Variant.h
  311.     #src/common/Vector.cpp # Vector.cpp is empty.
  312.     src/common/Vector.h
  313.     src/common/version.h
  314. )
  315.  
  316. if (APPLE)
  317.     set(LOVE_SRC_COMMON ${LOVE_SRC_COMMON}
  318.         src/common/macosx.mm
  319.     )
  320. endif()
  321.  
  322. source_group("common" FILES ${LOVE_SRC_COMMON})
  323.  
  324. #
  325. # love.audio
  326. #
  327.  
  328. set(LOVE_SRC_MODULE_AUDIO_ROOT
  329.     src/modules/audio/Audio.cpp
  330.     src/modules/audio/Audio.h
  331.     src/modules/audio/Source.cpp
  332.     src/modules/audio/Source.h
  333.     src/modules/audio/RecordingDevice.cpp
  334.     src/modules/audio/RecordingDevice.h
  335.     src/modules/audio/Filter.cpp
  336.     src/modules/audio/Filter.h
  337.     src/modules/audio/Effect.cpp
  338.     src/modules/audio/Effect.h
  339.     src/modules/audio/wrap_Audio.cpp
  340.     src/modules/audio/wrap_Audio.h
  341.     src/modules/audio/wrap_Source.cpp
  342.     src/modules/audio/wrap_Source.h
  343.     src/modules/audio/wrap_RecordingDevice.cpp
  344.     src/modules/audio/wrap_RecordingDevice.h
  345. )
  346.  
  347. set(LOVE_SRC_MODULE_AUDIO_NULL
  348.     src/modules/audio/null/Audio.cpp
  349.     src/modules/audio/null/Audio.h
  350.     src/modules/audio/null/Source.cpp
  351.     src/modules/audio/null/Source.h
  352.     src/modules/audio/null/RecordingDevice.cpp
  353.     src/modules/audio/null/RecordingDevice.h
  354. )
  355.  
  356. set(LOVE_SRC_MODULE_AUDIO_OPENAL
  357.     src/modules/audio/openal/Audio.cpp
  358.     src/modules/audio/openal/Audio.h
  359.     src/modules/audio/openal/Pool.cpp
  360.     src/modules/audio/openal/Pool.h
  361.     src/modules/audio/openal/Source.cpp
  362.     src/modules/audio/openal/Source.h
  363.     src/modules/audio/openal/RecordingDevice.cpp
  364.     src/modules/audio/openal/RecordingDevice.h
  365.     src/modules/audio/openal/Filter.cpp
  366.     src/modules/audio/openal/Filter.h
  367.     src/modules/audio/openal/Effect.cpp
  368.     src/modules/audio/openal/Effect.h
  369. )
  370.  
  371. set(LOVE_SRC_MODULE_AUDIO
  372.     ${LOVE_SRC_MODULE_AUDIO_ROOT}
  373.     ${LOVE_SRC_MODULE_AUDIO_NULL}
  374.     ${LOVE_SRC_MODULE_AUDIO_OPENAL}
  375. )
  376.  
  377. source_group("modules\\audio" FILES ${LOVE_SRC_MODULE_AUDIO_ROOT})
  378. source_group("modules\\audio\\null" FILES ${LOVE_SRC_MODULE_AUDIO_NULL})
  379. source_group("modules\\audio\\openal" FILES ${LOVE_SRC_MODULE_AUDIO_OPENAL})
  380.  
  381. #
  382. # love.data
  383. #
  384.  
  385. set(LOVE_SRC_MODULE_DATA
  386.     src/modules/data/ByteData.cpp
  387.     src/modules/data/ByteData.h
  388.     src/modules/data/CompressedData.cpp
  389.     src/modules/data/CompressedData.h
  390.     src/modules/data/Compressor.cpp
  391.     src/modules/data/Compressor.h
  392.     src/modules/data/DataModule.cpp
  393.     src/modules/data/DataModule.h
  394.     src/modules/data/DataView.cpp
  395.     src/modules/data/DataView.h
  396.     src/modules/data/HashFunction.cpp
  397.     src/modules/data/HashFunction.h
  398.     src/modules/data/wrap_ByteData.cpp
  399.     src/modules/data/wrap_ByteData.h
  400.     src/modules/data/wrap_CompressedData.cpp
  401.     src/modules/data/wrap_CompressedData.h
  402.     src/modules/data/wrap_Data.cpp
  403.     src/modules/data/wrap_Data.h
  404.     src/modules/data/wrap_DataModule.cpp
  405.     src/modules/data/wrap_DataModule.h
  406.     src/modules/data/wrap_DataView.cpp
  407.     src/modules/data/wrap_DataView.h
  408. )
  409.  
  410. source_group("modules\\data" FILES ${LOVE_SRC_MODULE_DATA})
  411.  
  412. #
  413. # love.event
  414. #
  415.  
  416. set(LOVE_SRC_MODULE_EVENT_ROOT
  417.     src/modules/event/Event.cpp
  418.     src/modules/event/Event.h
  419.     src/modules/event/wrap_Event.cpp
  420.     src/modules/event/wrap_Event.h
  421. )
  422.  
  423. set(LOVE_SRC_MODULE_EVENT_SDL
  424.     src/modules/event/sdl/Event.cpp
  425.     src/modules/event/sdl/Event.h
  426. )
  427.  
  428. set(LOVE_SRC_MODULE_EVENT
  429.     ${LOVE_SRC_MODULE_EVENT_ROOT}
  430.     ${LOVE_SRC_MODULE_EVENT_SDL}
  431. )
  432.  
  433. source_group("modules\\event" FILES ${LOVE_SRC_MODULE_EVENT_ROOT})
  434. source_group("modules\\event\\sdl" FILES ${LOVE_SRC_MODULE_EVENT_SDL})
  435.  
  436. #
  437. # love.filesystem
  438. #
  439.  
  440. set(LOVE_SRC_MODULE_FILESYSTEM_ROOT
  441.     src/modules/filesystem/DroppedFile.cpp
  442.     src/modules/filesystem/DroppedFile.h
  443.     src/modules/filesystem/File.cpp
  444.     src/modules/filesystem/File.h
  445.     src/modules/filesystem/FileData.cpp
  446.     src/modules/filesystem/FileData.h
  447.     src/modules/filesystem/Filesystem.cpp
  448.     src/modules/filesystem/Filesystem.h
  449.     src/modules/filesystem/wrap_DroppedFile.cpp
  450.     src/modules/filesystem/wrap_DroppedFile.h
  451.     src/modules/filesystem/wrap_File.cpp
  452.     src/modules/filesystem/wrap_File.h
  453.     src/modules/filesystem/wrap_FileData.cpp
  454.     src/modules/filesystem/wrap_FileData.h
  455.     src/modules/filesystem/wrap_Filesystem.cpp
  456.     src/modules/filesystem/wrap_Filesystem.h
  457. )
  458.  
  459. set(LOVE_SRC_MODULE_FILESYSTEM_PHYSFS
  460.     src/modules/filesystem/physfs/File.cpp
  461.     src/modules/filesystem/physfs/File.h
  462.     src/modules/filesystem/physfs/Filesystem.cpp
  463.     src/modules/filesystem/physfs/Filesystem.h
  464. )
  465.  
  466. set(LOVE_SRC_MODULE_FILESYSTEM
  467.     ${LOVE_SRC_MODULE_FILESYSTEM_ROOT}
  468.     ${LOVE_SRC_MODULE_FILESYSTEM_PHYSFS}
  469. )
  470.  
  471. source_group("modules\\filesystem" FILES ${LOVE_SRC_MODULE_FILESYSTEM_ROOT})
  472. source_group("modules\\filesystem\\physfs" FILES ${LOVE_SRC_MODULE_FILESYSTEM_PHYSFS})
  473.  
  474. #
  475. # love.font
  476. #
  477.  
  478. set(LOVE_SRC_MODULE_FONT_ROOT
  479.     src/modules/font/BMFontRasterizer.cpp
  480.     src/modules/font/BMFontRasterizer.h
  481.     src/modules/font/Font.cpp
  482.     src/modules/font/Font.h
  483.     src/modules/font/GlyphData.cpp
  484.     src/modules/font/GlyphData.h
  485.     src/modules/font/ImageRasterizer.cpp
  486.     src/modules/font/ImageRasterizer.h
  487.     src/modules/font/Rasterizer.cpp
  488.     src/modules/font/Rasterizer.h
  489.     src/modules/font/TrueTypeRasterizer.cpp
  490.     src/modules/font/TrueTypeRasterizer.h
  491.     src/modules/font/wrap_Font.cpp
  492.     src/modules/font/wrap_Font.h
  493.     src/modules/font/wrap_GlyphData.cpp
  494.     src/modules/font/wrap_GlyphData.h
  495.     src/modules/font/wrap_Rasterizer.cpp
  496.     src/modules/font/wrap_Rasterizer.h
  497. )
  498.  
  499. set(LOVE_SRC_MODULE_FONT_FREETYPE
  500.     src/modules/font/freetype/Font.cpp
  501.     src/modules/font/freetype/Font.h
  502.     src/modules/font/freetype/TrueTypeRasterizer.cpp
  503.     src/modules/font/freetype/TrueTypeRasterizer.h
  504. )
  505.  
  506. set(LOVE_SRC_MODULE_FONT
  507.     ${LOVE_SRC_MODULE_FONT_ROOT}
  508.     ${LOVE_SRC_MODULE_FONT_FREETYPE}
  509. )
  510.  
  511. source_group("modules\\font" FILES ${LOVE_SRC_MODULE_FONT_ROOT})
  512. source_group("modules\\font\\freetype" FILES ${LOVE_SRC_MODULE_FONT_FREETYPE})
  513.  
  514. #
  515. # love.graphics
  516. #
  517.  
  518. set(LOVE_SRC_MODULE_GRAPHICS_ROOT
  519.     src/modules/graphics/Buffer.cpp
  520.     src/modules/graphics/Buffer.h
  521.     src/modules/graphics/Canvas.cpp
  522.     src/modules/graphics/Canvas.h
  523.     src/modules/graphics/depthstencil.cpp
  524.     src/modules/graphics/depthstencil.h
  525.     src/modules/graphics/Deprecations.cpp
  526.     src/modules/graphics/Deprecations.h
  527.     src/modules/graphics/Drawable.cpp
  528.     src/modules/graphics/Drawable.h
  529.     src/modules/graphics/Font.cpp
  530.     src/modules/graphics/Font.h
  531.     src/modules/graphics/Graphics.cpp
  532.     src/modules/graphics/Graphics.h
  533.     src/modules/graphics/Image.cpp
  534.     src/modules/graphics/Image.h
  535.     src/modules/graphics/Mesh.cpp
  536.     src/modules/graphics/Mesh.h
  537.     src/modules/graphics/ParticleSystem.cpp
  538.     src/modules/graphics/ParticleSystem.h
  539.     src/modules/graphics/Polyline.cpp
  540.     src/modules/graphics/Polyline.h
  541.     src/modules/graphics/Quad.cpp
  542.     src/modules/graphics/Quad.h
  543.     src/modules/graphics/Resource.h
  544.     src/modules/graphics/Shader.cpp
  545.     src/modules/graphics/Shader.h
  546.     src/modules/graphics/ShaderStage.cpp
  547.     src/modules/graphics/ShaderStage.h
  548.     src/modules/graphics/SpriteBatch.cpp
  549.     src/modules/graphics/SpriteBatch.h
  550.     src/modules/graphics/StreamBuffer.cpp
  551.     src/modules/graphics/StreamBuffer.h
  552.     src/modules/graphics/Text.cpp
  553.     src/modules/graphics/Text.h
  554.     src/modules/graphics/Texture.cpp
  555.     src/modules/graphics/Texture.h
  556.     src/modules/graphics/vertex.cpp
  557.     src/modules/graphics/vertex.h
  558.     src/modules/graphics/Video.cpp
  559.     src/modules/graphics/Video.h
  560.     src/modules/graphics/Volatile.cpp
  561.     src/modules/graphics/Volatile.h
  562.     src/modules/graphics/wrap_Canvas.cpp
  563.     src/modules/graphics/wrap_Canvas.h
  564.     src/modules/graphics/wrap_Font.cpp
  565.     src/modules/graphics/wrap_Font.h
  566.     src/modules/graphics/wrap_Graphics.cpp
  567.     src/modules/graphics/wrap_Graphics.h
  568.     src/modules/graphics/wrap_Image.cpp
  569.     src/modules/graphics/wrap_Image.h
  570.     src/modules/graphics/wrap_Mesh.cpp
  571.     src/modules/graphics/wrap_Mesh.h
  572.     src/modules/graphics/wrap_ParticleSystem.cpp
  573.     src/modules/graphics/wrap_ParticleSystem.h
  574.     src/modules/graphics/wrap_Quad.cpp
  575.     src/modules/graphics/wrap_Quad.h
  576.     src/modules/graphics/wrap_Shader.cpp
  577.     src/modules/graphics/wrap_Shader.h
  578.     src/modules/graphics/wrap_SpriteBatch.cpp
  579.     src/modules/graphics/wrap_SpriteBatch.h
  580.     src/modules/graphics/wrap_Texture.cpp
  581.     src/modules/graphics/wrap_Texture.h
  582.     src/modules/graphics/wrap_Text.cpp
  583.     src/modules/graphics/wrap_Text.h
  584.     src/modules/graphics/wrap_Video.cpp
  585.     src/modules/graphics/wrap_Video.h
  586. )
  587.  
  588. set(LOVE_SRC_MODULE_GRAPHICS_OPENGL
  589.     src/modules/graphics/opengl/Buffer.cpp
  590.     src/modules/graphics/opengl/Buffer.h
  591.     src/modules/graphics/opengl/Canvas.cpp
  592.     src/modules/graphics/opengl/Canvas.h
  593.     src/modules/graphics/opengl/FenceSync.cpp
  594.     src/modules/graphics/opengl/FenceSync.h
  595.     src/modules/graphics/opengl/Graphics.cpp
  596.     src/modules/graphics/opengl/Graphics.h
  597.     src/modules/graphics/opengl/Image.cpp
  598.     src/modules/graphics/opengl/Image.h
  599.     src/modules/graphics/opengl/OpenGL.cpp
  600.     src/modules/graphics/opengl/OpenGL.h
  601.     src/modules/graphics/opengl/Shader.cpp
  602.     src/modules/graphics/opengl/Shader.h
  603.     src/modules/graphics/opengl/ShaderStage.cpp
  604.     src/modules/graphics/opengl/ShaderStage.h
  605.     src/modules/graphics/opengl/StreamBuffer.cpp
  606.     src/modules/graphics/opengl/StreamBuffer.h
  607. )
  608.  
  609. set(LOVE_SRC_MODULE_GRAPHICS
  610.     ${LOVE_SRC_MODULE_GRAPHICS_ROOT}
  611.     ${LOVE_SRC_MODULE_GRAPHICS_OPENGL}
  612. )
  613.  
  614. source_group("modules\\graphics" FILES ${LOVE_SRC_MODULE_GRAPHICS_ROOT})
  615. source_group("modules\\graphics\\opengl" FILES ${LOVE_SRC_MODULE_GRAPHICS_OPENGL})
  616.  
  617. #
  618. # love.image
  619. #
  620.  
  621. set(LOVE_SRC_MODULE_IMAGE_ROOT
  622.     src/modules/image/CompressedImageData.cpp
  623.     src/modules/image/CompressedImageData.h
  624.     src/modules/image/CompressedSlice.cpp
  625.     src/modules/image/CompressedSlice.h
  626.     src/modules/image/FormatHandler.cpp
  627.     src/modules/image/FormatHandler.h
  628.     src/modules/image/Image.cpp
  629.     src/modules/image/Image.h
  630.     src/modules/image/ImageData.cpp
  631.     src/modules/image/ImageData.h
  632.     src/modules/image/ImageDataBase.cpp
  633.     src/modules/image/ImageDataBase.h
  634.     src/modules/image/wrap_CompressedImageData.cpp
  635.     src/modules/image/wrap_CompressedImageData.h
  636.     src/modules/image/wrap_Image.cpp
  637.     src/modules/image/wrap_Image.h
  638.     src/modules/image/wrap_ImageData.cpp
  639.     src/modules/image/wrap_ImageData.h
  640. )
  641.  
  642. set(LOVE_SRC_MODULE_IMAGE_MAGPIE
  643.     src/modules/image/magpie/ASTCHandler.cpp
  644.     src/modules/image/magpie/ASTCHandler.h
  645.     src/modules/image/magpie/ddsHandler.cpp
  646.     src/modules/image/magpie/ddsHandler.h
  647.     src/modules/image/magpie/EXRHandler.cpp
  648.     src/modules/image/magpie/EXRHandler.h
  649.     src/modules/image/magpie/KTXHandler.cpp
  650.     src/modules/image/magpie/KTXHandler.h
  651.     src/modules/image/magpie/PKMHandler.cpp
  652.     src/modules/image/magpie/PKMHandler.h
  653.     src/modules/image/magpie/PNGHandler.cpp
  654.     src/modules/image/magpie/PNGHandler.h
  655.     src/modules/image/magpie/PVRHandler.cpp
  656.     src/modules/image/magpie/PVRHandler.h
  657.     src/modules/image/magpie/STBHandler.cpp
  658.     src/modules/image/magpie/STBHandler.h
  659. )
  660.  
  661. set(LOVE_SRC_MODULE_IMAGE
  662.     ${LOVE_SRC_MODULE_IMAGE_ROOT}
  663.     ${LOVE_SRC_MODULE_IMAGE_MAGPIE}
  664. )
  665.  
  666. source_group("modules\\image" FILES ${LOVE_SRC_MODULE_IMAGE_ROOT})
  667. source_group("modules\\image\\magpie" FILES ${LOVE_SRC_MODULE_IMAGE_MAGPIE})
  668.  
  669. #
  670. # love.joystick
  671. #
  672.  
  673. set(LOVE_SRC_MODULE_JOYSTICK_ROOT
  674.     src/modules/joystick/Joystick.cpp
  675.     src/modules/joystick/Joystick.h
  676.     src/modules/joystick/JoystickModule.h
  677.     src/modules/joystick/wrap_Joystick.cpp
  678.     src/modules/joystick/wrap_Joystick.h
  679.     src/modules/joystick/wrap_JoystickModule.cpp
  680.     src/modules/joystick/wrap_JoystickModule.h
  681. )
  682.  
  683. set(LOVE_SRC_MODULE_JOYSTICK_SDL
  684.     src/modules/joystick/sdl/Joystick.cpp
  685.     src/modules/joystick/sdl/Joystick.h
  686.     src/modules/joystick/sdl/JoystickModule.cpp
  687.     src/modules/joystick/sdl/JoystickModule.h
  688. )
  689.  
  690. set(LOVE_SRC_MODULE_JOYSTICK
  691.     ${LOVE_SRC_MODULE_JOYSTICK_ROOT}
  692.     ${LOVE_SRC_MODULE_JOYSTICK_SDL}
  693. )
  694.  
  695. source_group("modules\\joystick" FILES ${LOVE_SRC_MODULE_JOYSTICK_ROOT})
  696. source_group("modules\\joystick\\sdl" FILES ${LOVE_SRC_MODULE_JOYSTICK_SDL})
  697.  
  698. #
  699. # love.keyboard
  700. #
  701.  
  702. set(LOVE_SRC_MODULE_KEYBOARD_ROOT
  703.     src/modules/keyboard/Keyboard.cpp
  704.     src/modules/keyboard/Keyboard.h
  705.     src/modules/keyboard/wrap_Keyboard.cpp
  706.     src/modules/keyboard/wrap_Keyboard.h
  707. )
  708.  
  709. set(LOVE_SRC_MODULE_KEYBOARD_SDL
  710.     src/modules/keyboard/sdl/Keyboard.cpp
  711.     src/modules/keyboard/sdl/Keyboard.h
  712. )
  713.  
  714. set(LOVE_SRC_MODULE_KEYBOARD
  715.     ${LOVE_SRC_MODULE_KEYBOARD_ROOT}
  716.     ${LOVE_SRC_MODULE_KEYBOARD_SDL}
  717. )
  718.  
  719. source_group("modules\\keyboard" FILES ${LOVE_SRC_MODULE_KEYBOARD_ROOT})
  720. source_group("modules\\keyboard\\sdl" FILES ${LOVE_SRC_MODULE_KEYBOARD_SDL})
  721.  
  722. #
  723. # love.math
  724. #
  725.  
  726. set(LOVE_SRC_MODULE_MATH
  727.     src/modules/math/BezierCurve.cpp
  728.     src/modules/math/BezierCurve.h
  729.     src/modules/math/MathModule.cpp
  730.     src/modules/math/MathModule.h
  731.     src/modules/math/RandomGenerator.cpp
  732.     src/modules/math/RandomGenerator.h
  733.     src/modules/math/Transform.cpp
  734.     src/modules/math/Transform.h
  735.     src/modules/math/wrap_BezierCurve.cpp
  736.     src/modules/math/wrap_BezierCurve.h
  737.     src/modules/math/wrap_Math.cpp
  738.     src/modules/math/wrap_Math.h
  739.     src/modules/math/wrap_RandomGenerator.cpp
  740.     src/modules/math/wrap_RandomGenerator.h
  741.     src/modules/math/wrap_Transform.cpp
  742.     src/modules/math/wrap_Transform.h
  743. )
  744.  
  745. source_group("modules\\math" FILES ${LOVE_SRC_MODULE_MATH})
  746.  
  747. #
  748. # love (module)
  749. #
  750. set(LOVE_SRC_MODULE_LOVE
  751.     src/modules/love/love.cpp
  752.     src/modules/love/love.h
  753. )
  754.  
  755. source_group("modules\\love" FILES ${LOVE_SRC_MODULE_LOVE})
  756.  
  757. #
  758. # love.mouse
  759. #
  760.  
  761. set(LOVE_SRC_MODULE_MOUSE_ROOT
  762.     src/modules/mouse/Cursor.cpp
  763.     src/modules/mouse/Cursor.h
  764.     src/modules/mouse/Mouse.h
  765.     src/modules/mouse/wrap_Cursor.cpp
  766.     src/modules/mouse/wrap_Cursor.h
  767.     src/modules/mouse/wrap_Mouse.cpp
  768.     src/modules/mouse/wrap_Mouse.h
  769. )
  770.  
  771. set(LOVE_SRC_MODULE_MOUSE_SDL
  772.     src/modules/mouse/sdl/Cursor.cpp
  773.     src/modules/mouse/sdl/Cursor.h
  774.     src/modules/mouse/sdl/Mouse.cpp
  775.     src/modules/mouse/sdl/Mouse.h
  776. )
  777.  
  778. set(LOVE_SRC_MODULE_MOUSE
  779.     ${LOVE_SRC_MODULE_MOUSE_ROOT}
  780.     ${LOVE_SRC_MODULE_MOUSE_SDL}
  781. )
  782.  
  783. source_group("modules\\mouse" FILES ${LOVE_SRC_MODULE_MOUSE_ROOT})
  784. source_group("modules\\mouse\\sdl" FILES ${LOVE_SRC_MODULE_MOUSE_SDL})
  785.  
  786. #
  787. # love.physics
  788. #
  789.  
  790. set(LOVE_SRC_MODULE_PHYSICS_ROOT
  791.     src/modules/physics/Body.cpp
  792.     src/modules/physics/Body.h
  793.     src/modules/physics/Joint.cpp
  794.     src/modules/physics/Joint.h
  795.     src/modules/physics/Shape.cpp
  796.     src/modules/physics/Shape.h
  797. )
  798.  
  799. set(LOVE_SRC_MODULE_PHYSICS_BOX2D
  800.     src/modules/physics/box2d/Body.cpp
  801.     src/modules/physics/box2d/Body.h
  802.     src/modules/physics/box2d/ChainShape.cpp
  803.     src/modules/physics/box2d/ChainShape.h
  804.     src/modules/physics/box2d/CircleShape.cpp
  805.     src/modules/physics/box2d/CircleShape.h
  806.     src/modules/physics/box2d/Contact.cpp
  807.     src/modules/physics/box2d/Contact.h
  808.     src/modules/physics/box2d/DistanceJoint.cpp
  809.     src/modules/physics/box2d/DistanceJoint.h
  810.     src/modules/physics/box2d/EdgeShape.cpp
  811.     src/modules/physics/box2d/EdgeShape.h
  812.     src/modules/physics/box2d/Fixture.cpp
  813.     src/modules/physics/box2d/Fixture.h
  814.     src/modules/physics/box2d/FrictionJoint.cpp
  815.     src/modules/physics/box2d/FrictionJoint.h
  816.     src/modules/physics/box2d/GearJoint.cpp
  817.     src/modules/physics/box2d/GearJoint.h
  818.     src/modules/physics/box2d/Joint.cpp
  819.     src/modules/physics/box2d/Joint.h
  820.     src/modules/physics/box2d/MotorJoint.cpp
  821.     src/modules/physics/box2d/MotorJoint.h
  822.     src/modules/physics/box2d/MouseJoint.cpp
  823.     src/modules/physics/box2d/MouseJoint.h
  824.     src/modules/physics/box2d/Physics.cpp
  825.     src/modules/physics/box2d/Physics.h
  826.     src/modules/physics/box2d/PolygonShape.cpp
  827.     src/modules/physics/box2d/PolygonShape.h
  828.     src/modules/physics/box2d/PrismaticJoint.cpp
  829.     src/modules/physics/box2d/PrismaticJoint.h
  830.     src/modules/physics/box2d/PulleyJoint.cpp
  831.     src/modules/physics/box2d/PulleyJoint.h
  832.     src/modules/physics/box2d/RevoluteJoint.cpp
  833.     src/modules/physics/box2d/RevoluteJoint.h
  834.     src/modules/physics/box2d/RopeJoint.cpp
  835.     src/modules/physics/box2d/RopeJoint.h
  836.     src/modules/physics/box2d/Shape.cpp
  837.     src/modules/physics/box2d/Shape.h
  838.     src/modules/physics/box2d/WeldJoint.cpp
  839.     src/modules/physics/box2d/WeldJoint.h
  840.     src/modules/physics/box2d/WheelJoint.cpp
  841.     src/modules/physics/box2d/WheelJoint.h
  842.     src/modules/physics/box2d/World.cpp
  843.     src/modules/physics/box2d/World.h
  844.     src/modules/physics/box2d/wrap_Body.cpp
  845.     src/modules/physics/box2d/wrap_Body.h
  846.     src/modules/physics/box2d/wrap_ChainShape.cpp
  847.     src/modules/physics/box2d/wrap_ChainShape.h
  848.     src/modules/physics/box2d/wrap_CircleShape.cpp
  849.     src/modules/physics/box2d/wrap_CircleShape.h
  850.     src/modules/physics/box2d/wrap_Contact.cpp
  851.     src/modules/physics/box2d/wrap_Contact.h
  852.     src/modules/physics/box2d/wrap_DistanceJoint.cpp
  853.     src/modules/physics/box2d/wrap_DistanceJoint.h
  854.     src/modules/physics/box2d/wrap_EdgeShape.cpp
  855.     src/modules/physics/box2d/wrap_EdgeShape.h
  856.     src/modules/physics/box2d/wrap_Fixture.cpp
  857.     src/modules/physics/box2d/wrap_Fixture.h
  858.     src/modules/physics/box2d/wrap_FrictionJoint.cpp
  859.     src/modules/physics/box2d/wrap_FrictionJoint.h
  860.     src/modules/physics/box2d/wrap_GearJoint.cpp
  861.     src/modules/physics/box2d/wrap_GearJoint.h
  862.     src/modules/physics/box2d/wrap_Joint.cpp
  863.     src/modules/physics/box2d/wrap_Joint.h
  864.     src/modules/physics/box2d/wrap_MotorJoint.cpp
  865.     src/modules/physics/box2d/wrap_MotorJoint.h
  866.     src/modules/physics/box2d/wrap_MouseJoint.cpp
  867.     src/modules/physics/box2d/wrap_MouseJoint.h
  868.     src/modules/physics/box2d/wrap_Physics.cpp
  869.     src/modules/physics/box2d/wrap_Physics.h
  870.     src/modules/physics/box2d/wrap_PolygonShape.cpp
  871.     src/modules/physics/box2d/wrap_PolygonShape.h
  872.     src/modules/physics/box2d/wrap_PrismaticJoint.cpp
  873.     src/modules/physics/box2d/wrap_PrismaticJoint.h
  874.     src/modules/physics/box2d/wrap_PulleyJoint.cpp
  875.     src/modules/physics/box2d/wrap_PulleyJoint.h
  876.     src/modules/physics/box2d/wrap_RevoluteJoint.cpp
  877.     src/modules/physics/box2d/wrap_RevoluteJoint.h
  878.     src/modules/physics/box2d/wrap_RopeJoint.cpp
  879.     src/modules/physics/box2d/wrap_RopeJoint.h
  880.     src/modules/physics/box2d/wrap_Shape.cpp
  881.     src/modules/physics/box2d/wrap_Shape.h
  882.     src/modules/physics/box2d/wrap_WeldJoint.cpp
  883.     src/modules/physics/box2d/wrap_WeldJoint.h
  884.     src/modules/physics/box2d/wrap_WheelJoint.cpp
  885.     src/modules/physics/box2d/wrap_WheelJoint.h
  886.     src/modules/physics/box2d/wrap_World.cpp
  887.     src/modules/physics/box2d/wrap_World.h
  888. )
  889.  
  890. set(LOVE_SRC_MODULE_PHYSICS
  891.     ${LOVE_SRC_MODULE_PHYSICS_ROOT}
  892.     ${LOVE_SRC_MODULE_PHYSICS_BOX2D}
  893. )
  894.  
  895. source_group("modules\\physics" FILES ${LOVE_SRC_MODULE_PHYSICS_ROOT})
  896. source_group("modules\\physics\\box2d" FILES ${LOVE_SRC_MODULE_PHYSICS_BOX2D})
  897.  
  898. #
  899. # love.sound
  900. #
  901.  
  902. set(LOVE_SRC_MODULE_SOUND_ROOT
  903.     src/modules/sound/Decoder.cpp
  904.     src/modules/sound/Decoder.h
  905.     src/modules/sound/Sound.cpp
  906.     src/modules/sound/Sound.h
  907.     src/modules/sound/SoundData.cpp
  908.     src/modules/sound/SoundData.h
  909.     src/modules/sound/wrap_Decoder.cpp
  910.     src/modules/sound/wrap_Decoder.h
  911.     src/modules/sound/wrap_Sound.cpp
  912.     src/modules/sound/wrap_Sound.h
  913.     src/modules/sound/wrap_SoundData.cpp
  914.     src/modules/sound/wrap_SoundData.h
  915. )
  916.  
  917. set(LOVE_SRC_MODULE_SOUND_LULLABY
  918.     src/modules/sound/lullaby/FLACDecoder.cpp
  919.     src/modules/sound/lullaby/FLACDecoder.h
  920.     src/modules/sound/lullaby/GmeDecoder.cpp
  921.     src/modules/sound/lullaby/GmeDecoder.h
  922.     src/modules/sound/lullaby/ModPlugDecoder.cpp
  923.     src/modules/sound/lullaby/ModPlugDecoder.h
  924.     src/modules/sound/lullaby/Sound.cpp
  925.     src/modules/sound/lullaby/Sound.h
  926.     src/modules/sound/lullaby/VorbisDecoder.cpp
  927.     src/modules/sound/lullaby/VorbisDecoder.h
  928.     src/modules/sound/lullaby/WaveDecoder.cpp
  929.     src/modules/sound/lullaby/WaveDecoder.h
  930. )
  931.  
  932. if(LOVE_MPG123)
  933.     set(LOVE_SRC_MODULE_SOUND_LULLABY
  934.         ${LOVE_SRC_MODULE_SOUND_LULLABY}
  935.         src/modules/sound/lullaby/Mpg123Decoder.cpp
  936.         src/modules/sound/lullaby/Mpg123Decoder.h
  937.     )
  938. endif()
  939.  
  940. set(LOVE_SRC_MODULE_SOUND
  941.     ${LOVE_SRC_MODULE_SOUND_ROOT}
  942.     ${LOVE_SRC_MODULE_SOUND_LULLABY}
  943. )
  944.  
  945. source_group("modules\\sound" FILES ${LOVE_SRC_MODULE_SOUND_ROOT})
  946. source_group("modules\\sound\\lullaby" FILES ${LOVE_SRC_MODULE_SOUND_LULLABY})
  947.  
  948. #
  949. # love.system
  950. #
  951.  
  952. set(LOVE_SRC_MODULE_SYSTEM_ROOT
  953.     src/modules/system/System.cpp
  954.     src/modules/system/System.h
  955.     src/modules/system/wrap_System.cpp
  956.     src/modules/system/wrap_System.h
  957. )
  958.  
  959. set(LOVE_SRC_MODULE_SYSTEM_SDL
  960.     src/modules/system/sdl/System.cpp
  961.     src/modules/system/sdl/System.h
  962. )
  963.  
  964. set(LOVE_SRC_MODULE_SYSTEM
  965.     ${LOVE_SRC_MODULE_SYSTEM_ROOT}
  966.     ${LOVE_SRC_MODULE_SYSTEM_SDL}
  967. )
  968.  
  969. source_group("modules\\system" FILES ${LOVE_SRC_MODULE_SYSTEM_ROOT})
  970. source_group("modules\\system\\sdl" FILES ${LOVE_SRC_MODULE_SYSTEM_SDL})
  971.  
  972. #
  973. # love.thread
  974. #
  975.  
  976. set(LOVE_SRC_MODULE_THREAD_ROOT
  977.     src/modules/thread/Channel.cpp
  978.     src/modules/thread/Channel.h
  979.     src/modules/thread/LuaThread.cpp
  980.     src/modules/thread/LuaThread.h
  981.     src/modules/thread/Thread.h
  982.     src/modules/thread/ThreadModule.cpp
  983.     src/modules/thread/ThreadModule.h
  984.     src/modules/thread/threads.cpp
  985.     src/modules/thread/threads.h
  986.     src/modules/thread/wrap_Channel.cpp
  987.     src/modules/thread/wrap_Channel.h
  988.     src/modules/thread/wrap_LuaThread.cpp
  989.     src/modules/thread/wrap_LuaThread.h
  990.     src/modules/thread/wrap_ThreadModule.cpp
  991.     src/modules/thread/wrap_ThreadModule.h
  992. )
  993.  
  994. set(LOVE_SRC_MODULE_THREAD_SDL
  995.     src/modules/thread/sdl/Thread.cpp
  996.     src/modules/thread/sdl/Thread.h
  997.     src/modules/thread/sdl/threads.cpp
  998.     src/modules/thread/sdl/threads.h
  999. )
  1000.  
  1001. set(LOVE_SRC_MODULE_THREAD
  1002.     ${LOVE_SRC_MODULE_THREAD_ROOT}
  1003.     ${LOVE_SRC_MODULE_THREAD_SDL}
  1004. )
  1005.  
  1006. source_group("modules\\thread" FILES ${LOVE_SRC_MODULE_THREAD_ROOT})
  1007. source_group("modules\\thread\\sdl" FILES ${LOVE_SRC_MODULE_THREAD_SDL})
  1008.  
  1009. #
  1010. # love.timer
  1011. #
  1012.  
  1013. set(LOVE_SRC_MODULE_TIMER
  1014.     src/modules/timer/Timer.cpp
  1015.     src/modules/timer/Timer.h
  1016.     src/modules/timer/wrap_Timer.cpp
  1017.     src/modules/timer/wrap_Timer.h
  1018. )
  1019.  
  1020. source_group("modules\\timer" FILES ${LOVE_SRC_MODULE_TIMER})
  1021.  
  1022. #
  1023. # love.touch
  1024. #
  1025.  
  1026. set(LOVE_SRC_MODULE_TOUCH_ROOT
  1027.     src/modules/touch/Touch.h
  1028.     src/modules/touch/wrap_Touch.cpp
  1029.     src/modules/touch/wrap_Touch.h
  1030. )
  1031.  
  1032. set(LOVE_SRC_MODULE_TOUCH_SDL
  1033.     src/modules/touch/sdl/Touch.cpp
  1034.     src/modules/touch/sdl/Touch.h
  1035. )
  1036.  
  1037. set(LOVE_SRC_MODULE_TOUCH
  1038.     ${LOVE_SRC_MODULE_TOUCH_ROOT}
  1039.     ${LOVE_SRC_MODULE_TOUCH_SDL}
  1040. )
  1041.  
  1042. source_group("modules\\touch" FILES ${LOVE_SRC_MODULE_TOUCH_ROOT})
  1043. source_group("modules\\touch\\sdl" FILES ${LOVE_SRC_MODULE_TOUCH_SDL})
  1044.  
  1045. #
  1046. # love.video
  1047. #
  1048.  
  1049. set(LOVE_SRC_MODULE_VIDEO_ROOT
  1050.     src/modules/video/Video.h
  1051.     src/modules/video/VideoStream.cpp
  1052.     src/modules/video/VideoStream.h
  1053.     src/modules/video/wrap_Video.cpp
  1054.     src/modules/video/wrap_Video.h
  1055.     src/modules/video/wrap_VideoStream.cpp
  1056.     src/modules/video/wrap_VideoStream.h
  1057. )
  1058.  
  1059. set(LOVE_SRC_MODULE_VIDEO_THEORA
  1060.     src/modules/video/theora/Video.cpp
  1061.     src/modules/video/theora/Video.h
  1062.     src/modules/video/theora/OggDemuxer.cpp
  1063.     src/modules/video/theora/OggDemuxer.h
  1064.     src/modules/video/theora/TheoraVideoStream.cpp
  1065.     src/modules/video/theora/TheoraVideoStream.h
  1066. )
  1067.  
  1068. set(LOVE_SRC_MODULE_VIDEO
  1069.     ${LOVE_SRC_MODULE_VIDEO_ROOT}
  1070.     ${LOVE_SRC_MODULE_VIDEO_THEORA}
  1071. )
  1072.  
  1073. source_group("modules\\video" FILES ${LOVE_SRC_MODULE_VIDEO_ROOT})
  1074. source_group("modules\\video\\theora" FILES ${LOVE_SRC_MODULE_VIDEO_THEORA})
  1075.  
  1076. #
  1077. # love.window
  1078. #
  1079.  
  1080. set(LOVE_SRC_MODULE_WINDOW_ROOT
  1081.     src/modules/window/Window.cpp
  1082.     src/modules/window/Window.h
  1083.     src/modules/window/wrap_Window.cpp
  1084.     src/modules/window/wrap_Window.h
  1085. )
  1086.  
  1087. set(LOVE_SRC_MODULE_WINDOW_SDL
  1088.     src/modules/window/sdl/Window.cpp
  1089.     src/modules/window/sdl/Window.h
  1090. )
  1091.  
  1092. set(LOVE_SRC_MODULE_WINDOW
  1093.     ${LOVE_SRC_MODULE_WINDOW_ROOT}
  1094.     ${LOVE_SRC_MODULE_WINDOW_SDL}
  1095. )
  1096.  
  1097. source_group("modules\\window" FILES ${LOVE_SRC_MODULE_WINDOW_ROOT})
  1098. source_group("modules\\window\\sdl" FILES ${LOVE_SRC_MODULE_WINDOW_SDL})
  1099.  
  1100. ###################################
  1101. # Third-party libraries
  1102. ###################################
  1103.  
  1104. #
  1105. # Box2D
  1106. #
  1107.  
  1108. set(LOVE_SRC_3P_BOX2D_ROOT
  1109.     src/libraries/Box2D/Box2D.h
  1110. )
  1111.  
  1112. set(LOVE_SRC_3P_BOX2D_COLLISION
  1113.     src/libraries/Box2D/Collision/b2BroadPhase.cpp
  1114.     src/libraries/Box2D/Collision/b2BroadPhase.h
  1115.     src/libraries/Box2D/Collision/b2CollideCircle.cpp
  1116.     src/libraries/Box2D/Collision/b2CollideEdge.cpp
  1117.     src/libraries/Box2D/Collision/b2CollidePolygon.cpp
  1118.     src/libraries/Box2D/Collision/b2Collision.cpp
  1119.     src/libraries/Box2D/Collision/b2Collision.h
  1120.     src/libraries/Box2D/Collision/b2Distance.cpp
  1121.     src/libraries/Box2D/Collision/b2Distance.h
  1122.     src/libraries/Box2D/Collision/b2DynamicTree.cpp
  1123.     src/libraries/Box2D/Collision/b2DynamicTree.h
  1124.     src/libraries/Box2D/Collision/b2TimeOfImpact.cpp
  1125.     src/libraries/Box2D/Collision/b2TimeOfImpact.h
  1126. )
  1127.  
  1128. set(LOVE_SRC_3P_BOX2D_COLLISION_SHAPES
  1129.     src/libraries/Box2D/Collision/Shapes/b2ChainShape.cpp
  1130.     src/libraries/Box2D/Collision/Shapes/b2ChainShape.h
  1131.     src/libraries/Box2D/Collision/Shapes/b2CircleShape.cpp
  1132.     src/libraries/Box2D/Collision/Shapes/b2CircleShape.h
  1133.     src/libraries/Box2D/Collision/Shapes/b2EdgeShape.cpp
  1134.     src/libraries/Box2D/Collision/Shapes/b2EdgeShape.h
  1135.     src/libraries/Box2D/Collision/Shapes/b2PolygonShape.cpp
  1136.     src/libraries/Box2D/Collision/Shapes/b2PolygonShape.h
  1137.     src/libraries/Box2D/Collision/Shapes/b2Shape.h
  1138. )
  1139.  
  1140. set(LOVE_SRC_3P_BOX2D_COMMON
  1141.     src/libraries/Box2D/Common/b2BlockAllocator.cpp
  1142.     src/libraries/Box2D/Common/b2BlockAllocator.h
  1143.     src/libraries/Box2D/Common/b2Draw.cpp
  1144.     src/libraries/Box2D/Common/b2Draw.h
  1145.     src/libraries/Box2D/Common/b2GrowableStack.h
  1146.     src/libraries/Box2D/Common/b2Math.cpp
  1147.     src/libraries/Box2D/Common/b2Math.h
  1148.     src/libraries/Box2D/Common/b2Settings.cpp
  1149.     src/libraries/Box2D/Common/b2Settings.h
  1150.     src/libraries/Box2D/Common/b2StackAllocator.cpp
  1151.     src/libraries/Box2D/Common/b2StackAllocator.h
  1152.     src/libraries/Box2D/Common/b2Timer.cpp
  1153.     src/libraries/Box2D/Common/b2Timer.h
  1154. )
  1155.  
  1156. set(LOVE_SRC_3P_BOX2D_DYNAMICS
  1157.     src/libraries/Box2D/Dynamics/b2Body.cpp
  1158.     src/libraries/Box2D/Dynamics/b2Body.h
  1159.     src/libraries/Box2D/Dynamics/b2ContactManager.cpp
  1160.     src/libraries/Box2D/Dynamics/b2ContactManager.h
  1161.     src/libraries/Box2D/Dynamics/b2Fixture.cpp
  1162.     src/libraries/Box2D/Dynamics/b2Fixture.h
  1163.     src/libraries/Box2D/Dynamics/b2Island.cpp
  1164.     src/libraries/Box2D/Dynamics/b2Island.h
  1165.     src/libraries/Box2D/Dynamics/b2TimeStep.h
  1166.     src/libraries/Box2D/Dynamics/b2World.cpp
  1167.     src/libraries/Box2D/Dynamics/b2World.h
  1168.     src/libraries/Box2D/Dynamics/b2WorldCallbacks.cpp
  1169.     src/libraries/Box2D/Dynamics/b2WorldCallbacks.h
  1170. )
  1171.  
  1172. set(LOVE_SRC_3P_BOX2D_DYNAMICS_CONTACTS
  1173.     src/libraries/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.cpp
  1174.     src/libraries/Box2D/Dynamics/Contacts/b2ChainAndCircleContact.h
  1175.     src/libraries/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.cpp
  1176.     src/libraries/Box2D/Dynamics/Contacts/b2ChainAndPolygonContact.h
  1177.     src/libraries/Box2D/Dynamics/Contacts/b2CircleContact.cpp
  1178.     src/libraries/Box2D/Dynamics/Contacts/b2CircleContact.h
  1179.     src/libraries/Box2D/Dynamics/Contacts/b2Contact.cpp
  1180.     src/libraries/Box2D/Dynamics/Contacts/b2Contact.h
  1181.     src/libraries/Box2D/Dynamics/Contacts/b2ContactSolver.cpp
  1182.     src/libraries/Box2D/Dynamics/Contacts/b2ContactSolver.h
  1183.     src/libraries/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.cpp
  1184.     src/libraries/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h
  1185.     src/libraries/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp
  1186.     src/libraries/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.h
  1187.     src/libraries/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp
  1188.     src/libraries/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h
  1189.     src/libraries/Box2D/Dynamics/Contacts/b2PolygonContact.cpp
  1190.     src/libraries/Box2D/Dynamics/Contacts/b2PolygonContact.h
  1191. )
  1192.  
  1193. set(LOVE_SRC_3P_BOX2D_DYNAMICS_JOINTS
  1194.     src/libraries/Box2D/Dynamics/Joints/b2DistanceJoint.cpp
  1195.     src/libraries/Box2D/Dynamics/Joints/b2DistanceJoint.h
  1196.     src/libraries/Box2D/Dynamics/Joints/b2FrictionJoint.cpp
  1197.     src/libraries/Box2D/Dynamics/Joints/b2FrictionJoint.h
  1198.     src/libraries/Box2D/Dynamics/Joints/b2GearJoint.cpp
  1199.     src/libraries/Box2D/Dynamics/Joints/b2GearJoint.h
  1200.     src/libraries/Box2D/Dynamics/Joints/b2Joint.cpp
  1201.     src/libraries/Box2D/Dynamics/Joints/b2Joint.h
  1202.     src/libraries/Box2D/Dynamics/Joints/b2MotorJoint.cpp
  1203.     src/libraries/Box2D/Dynamics/Joints/b2MotorJoint.h
  1204.     src/libraries/Box2D/Dynamics/Joints/b2MouseJoint.cpp
  1205.     src/libraries/Box2D/Dynamics/Joints/b2MouseJoint.h
  1206.     src/libraries/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp
  1207.     src/libraries/Box2D/Dynamics/Joints/b2PrismaticJoint.h
  1208.     src/libraries/Box2D/Dynamics/Joints/b2PulleyJoint.cpp
  1209.     src/libraries/Box2D/Dynamics/Joints/b2PulleyJoint.h
  1210.     src/libraries/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp
  1211.     src/libraries/Box2D/Dynamics/Joints/b2RevoluteJoint.h
  1212.     src/libraries/Box2D/Dynamics/Joints/b2RopeJoint.cpp
  1213.     src/libraries/Box2D/Dynamics/Joints/b2RopeJoint.h
  1214.     src/libraries/Box2D/Dynamics/Joints/b2WeldJoint.cpp
  1215.     src/libraries/Box2D/Dynamics/Joints/b2WeldJoint.h
  1216.     src/libraries/Box2D/Dynamics/Joints/b2WheelJoint.cpp
  1217.     src/libraries/Box2D/Dynamics/Joints/b2WheelJoint.h
  1218. )
  1219.  
  1220. set(LOVE_SRC_3P_BOX2D_ROPE
  1221.     src/libraries/Box2D/Rope/b2Rope.cpp
  1222.     src/libraries/Box2D/Rope/b2Rope.h
  1223. )
  1224.  
  1225. set(LOVE_SRC_3P_BOX2D
  1226.     ${LOVE_SRC_3P_BOX2D_ROOT}
  1227.     ${LOVE_SRC_3P_BOX2D_COLLISION}
  1228.     ${LOVE_SRC_3P_BOX2D_COLLISION_SHAPES}
  1229.     ${LOVE_SRC_3P_BOX2D_COMMON}
  1230.     ${LOVE_SRC_3P_BOX2D_DYNAMICS}
  1231.     ${LOVE_SRC_3P_BOX2D_DYNAMICS_CONTACTS}
  1232.     ${LOVE_SRC_3P_BOX2D_DYNAMICS_JOINTS}
  1233.     ${LOVE_SRC_3P_BOX2D_ROPE}
  1234. )
  1235.  
  1236. add_library(love_3p_box2d ${LOVE_SRC_3P_BOX2D})
  1237.  
  1238. #
  1239. # ddsparse
  1240. #
  1241.  
  1242. set(LOVE_SRC_3P_DDSPARSE
  1243.     src/libraries/ddsparse/ddsinfo.h
  1244.     src/libraries/ddsparse/ddsparse.cpp
  1245.     src/libraries/ddsparse/ddsparse.h
  1246. )
  1247.  
  1248. add_library(love_3p_ddsparse ${LOVE_SRC_3P_DDSPARSE})
  1249.  
  1250. #
  1251. # dr_flac
  1252. #
  1253.  
  1254. set(LOVE_SRC_3P_DRFLAC
  1255.     src/libraries/dr_flac/dr_flac.h
  1256. )
  1257.  
  1258. # dr_flac has no implementation files of its own.
  1259.  
  1260. #
  1261. # enet
  1262. #
  1263.  
  1264. set(LOVE_SRC_3P_ENET_ROOT
  1265.     src/libraries/enet/enet.cpp
  1266.     src/libraries/enet/lua-enet.h
  1267. )
  1268.  
  1269. set(LOVE_SRC_3P_ENET_LIBENET
  1270.     src/libraries/enet/libenet/callbacks.c
  1271.     src/libraries/enet/libenet/compress.c
  1272.     src/libraries/enet/libenet/host.c
  1273.     src/libraries/enet/libenet/list.c
  1274.     src/libraries/enet/libenet/packet.c
  1275.     src/libraries/enet/libenet/peer.c
  1276.     src/libraries/enet/libenet/protocol.c
  1277.     src/libraries/enet/libenet/unix.c
  1278.     src/libraries/enet/libenet/win32.c
  1279. )
  1280.  
  1281. set(LOVE_SRC_3P_ENET_LIBENET_INCLUDE_ENET
  1282.     src/libraries/enet/libenet/include/enet/enet.h
  1283.     src/libraries/enet/libenet/include/enet/list.h
  1284.     src/libraries/enet/libenet/include/enet/protocol.h
  1285.     src/libraries/enet/libenet/include/enet/time.h
  1286.     src/libraries/enet/libenet/include/enet/types.h
  1287.     src/libraries/enet/libenet/include/enet/unix.h
  1288.     src/libraries/enet/libenet/include/enet/utility.h
  1289.     src/libraries/enet/libenet/include/enet/win32.h
  1290. )
  1291.  
  1292. set(LOVE_SRC_3P_ENET
  1293.     ${LOVE_SRC_3P_ENET_ROOT}
  1294.     ${LOVE_SRC_3P_ENET_LIBENET}
  1295.     ${LOVE_SRC_3P_ENET_LIBENET_INCLUDE_ENET}
  1296. )
  1297.  
  1298. add_library(love_3p_enet ${LOVE_SRC_3P_ENET})
  1299. target_link_libraries(love_3p_enet ${LOVE_LUA_LIBRARY})
  1300. target_include_directories(love_3p_enet PUBLIC src/libraries/enet/libenet/include)
  1301.  
  1302. #
  1303. # GLAD
  1304. #
  1305.  
  1306. set(LOVE_SRC_3P_GLAD
  1307.     src/libraries/glad/glad.cpp
  1308.     src/libraries/glad/glad.hpp
  1309.     src/libraries/glad/gladfuncs.hpp
  1310. )
  1311.  
  1312. add_library(love_3p_glad ${LOVE_SRC_3P_GLAD})
  1313.  
  1314. #
  1315. # glslang
  1316. #
  1317.  
  1318. set(LOVE_SRC_3P_GLSLANG_GLSLANG_GENERICCODEGEN
  1319.     src/libraries/glslang/glslang/GenericCodeGen/CodeGen.cpp
  1320.     src/libraries/glslang/glslang/GenericCodeGen/Link.cpp
  1321. )
  1322.  
  1323. set(LOVE_SRC_3P_GLSLANG_GLSLANG_INCLUDE
  1324.     src/libraries/glslang/glslang/Include/arrays.h
  1325.     src/libraries/glslang/glslang/Include/BaseTypes.h
  1326.     src/libraries/glslang/glslang/Include/Common.h
  1327.     src/libraries/glslang/glslang/Include/ConstantUnion.h
  1328.     src/libraries/glslang/glslang/Include/InfoSink.h
  1329.     src/libraries/glslang/glslang/Include/InitializeGlobals.h
  1330.     src/libraries/glslang/glslang/Include/intermediate.h
  1331.     src/libraries/glslang/glslang/Include/PoolAlloc.h
  1332.     src/libraries/glslang/glslang/Include/ResourceLimits.h
  1333.     src/libraries/glslang/glslang/Include/revision.h
  1334.     src/libraries/glslang/glslang/Include/ShHandle.h
  1335.     src/libraries/glslang/glslang/Include/Types.h
  1336. )
  1337.  
  1338. set(LOVE_SRC_3P_GLSLANG_GLSLANG_MACHINEINDEPENDENT_PREPROCESSOR
  1339.     src/libraries/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp
  1340.     src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp
  1341.     src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp
  1342.     src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.h
  1343.     src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp
  1344.     src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp
  1345.     src/libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h
  1346. )
  1347.  
  1348. set(LOVE_SRC_3P_GLSLANG_GLSLANG_MACHINEINDEPENDENT
  1349.     ${LOVE_SRC_3P_GLSLANG_GLSLANG_MACHINEINDEPENDENT_PREPROCESSOR}
  1350.     src/libraries/glslang/glslang/MachineIndependent/attribute.cpp
  1351.     src/libraries/glslang/glslang/MachineIndependent/attribute.h
  1352.     src/libraries/glslang/glslang/MachineIndependent/Constant.cpp
  1353.     src/libraries/glslang/glslang/MachineIndependent/gl_types.h
  1354.     src/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp
  1355.     src/libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
  1356.     src/libraries/glslang/glslang/MachineIndependent/InfoSink.cpp
  1357.     src/libraries/glslang/glslang/MachineIndependent/Initialize.cpp
  1358.     src/libraries/glslang/glslang/MachineIndependent/Initialize.h
  1359.     src/libraries/glslang/glslang/MachineIndependent/Intermediate.cpp
  1360.     src/libraries/glslang/glslang/MachineIndependent/intermOut.cpp
  1361.     src/libraries/glslang/glslang/MachineIndependent/IntermTraverse.cpp
  1362.     src/libraries/glslang/glslang/MachineIndependent/iomapper.cpp
  1363.     src/libraries/glslang/glslang/MachineIndependent/iomapper.h
  1364.     src/libraries/glslang/glslang/MachineIndependent/limits.cpp
  1365.     src/libraries/glslang/glslang/MachineIndependent/linkValidate.cpp
  1366.     src/libraries/glslang/glslang/MachineIndependent/LiveTraverser.h
  1367.     src/libraries/glslang/glslang/MachineIndependent/localintermediate.h
  1368.     src/libraries/glslang/glslang/MachineIndependent/parseConst.cpp
  1369.     src/libraries/glslang/glslang/MachineIndependent/ParseContextBase.cpp
  1370.     src/libraries/glslang/glslang/MachineIndependent/ParseHelper.cpp
  1371.     src/libraries/glslang/glslang/MachineIndependent/ParseHelper.h
  1372.     src/libraries/glslang/glslang/MachineIndependent/parseVersions.h
  1373.     src/libraries/glslang/glslang/MachineIndependent/pch.cpp
  1374.     src/libraries/glslang/glslang/MachineIndependent/pch.h
  1375.     src/libraries/glslang/glslang/MachineIndependent/PoolAlloc.cpp
  1376.     src/libraries/glslang/glslang/MachineIndependent/propagateNoContraction.cpp
  1377.     src/libraries/glslang/glslang/MachineIndependent/propagateNoContraction.h
  1378.     src/libraries/glslang/glslang/MachineIndependent/reflection.cpp
  1379.     src/libraries/glslang/glslang/MachineIndependent/reflection.h
  1380.     src/libraries/glslang/glslang/MachineIndependent/RemoveTree.cpp
  1381.     src/libraries/glslang/glslang/MachineIndependent/RemoveTree.h
  1382.     src/libraries/glslang/glslang/MachineIndependent/Scan.cpp
  1383.     src/libraries/glslang/glslang/MachineIndependent/Scan.h
  1384.     src/libraries/glslang/glslang/MachineIndependent/ScanContext.h
  1385.     src/libraries/glslang/glslang/MachineIndependent/ShaderLang.cpp
  1386.     src/libraries/glslang/glslang/MachineIndependent/SymbolTable.cpp
  1387.     src/libraries/glslang/glslang/MachineIndependent/SymbolTable.h
  1388.     src/libraries/glslang/glslang/MachineIndependent/Versions.cpp
  1389.     src/libraries/glslang/glslang/MachineIndependent/Versions.h
  1390. )
  1391.  
  1392. set(LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT
  1393.     src/libraries/glslang/glslang/OSDependent/osinclude.h
  1394. )
  1395.  
  1396. if(MSVC)
  1397.     set(LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT
  1398.         ${LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT}
  1399.         src/libraries/glslang/glslang/OSDependent/Windows/main.cpp
  1400.         src/libraries/glslang/glslang/OSDependent/Windows/ossource.cpp
  1401.     )
  1402. else()
  1403.     set(LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT
  1404.         ${LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT}
  1405.         src/libraries/glslang/glslang/OSDependent/Unix/ossource.cpp
  1406.     )
  1407. endif()
  1408.  
  1409. set(LOVE_SRC_3P_GLSLANG_GLSLANG_PUBLIC
  1410.     src/libraries/glslang/glslang/Public/ShaderLang.h
  1411. )
  1412.  
  1413. set(LOVE_SRC_3P_GLSLANG_GLSLANG
  1414.     ${LOVE_SRC_3P_GLSLANG_GLSLANG_GENERICCODEGEN}
  1415.     ${LOVE_SRC_3P_GLSLANG_GLSLANG_INCLUDE}
  1416.     ${LOVE_SRC_3P_GLSLANG_GLSLANG_MACHINEINDEPENDENT}
  1417.     ${LOVE_SRC_3P_GLSLANG_GLSLANG_OSDEPENDENT}
  1418.     ${LOVE_SRC_3P_GLSLANG_GLSLANG_PUBLIC}
  1419. )
  1420.  
  1421. set(LOVE_SRC_3P_GLSLANG_OGLCOMPILERSDLL
  1422.     src/libraries/glslang/OGLCompilersDLL/InitializeDll.cpp
  1423.     src/libraries/glslang/OGLCompilersDLL/InitializeDll.h
  1424. )
  1425.  
  1426. set(LOVE_SRC_3P_GLSLANG
  1427.     ${LOVE_SRC_3P_GLSLANG_GLSLANG}
  1428.     ${LOVE_SRC_3P_GLSLANG_OGLCOMPILERSDLL}
  1429. )
  1430.  
  1431. add_library(love_3p_glslang ${LOVE_SRC_3P_GLSLANG})
  1432.  
  1433. #
  1434. # LodePNG
  1435. #
  1436.  
  1437. set(LOVE_SRC_3P_LODEPNG
  1438.     src/libraries/lodepng/lodepng.cpp
  1439.     src/libraries/lodepng/lodepng.h
  1440. )
  1441.  
  1442. add_library(love_3p_lodepng ${LOVE_SRC_3P_LODEPNG})
  1443.  
  1444. #
  1445. # luasocket
  1446. #
  1447.  
  1448. set(LOVE_SRC_3P_LUASOCKET_ROOT
  1449.     src/libraries/luasocket/luasocket.cpp
  1450.     src/libraries/luasocket/luasocket.h
  1451. )
  1452.  
  1453. set(LOVE_SRC_3P_LUASOCKET_LIBLUASOCKET
  1454.     src/libraries/luasocket/libluasocket/auxiliar.c
  1455.     src/libraries/luasocket/libluasocket/auxiliar.h
  1456.     src/libraries/luasocket/libluasocket/buffer.c
  1457.     src/libraries/luasocket/libluasocket/buffer.h
  1458.     src/libraries/luasocket/libluasocket/compat.c
  1459.     src/libraries/luasocket/libluasocket/compat.h
  1460.     src/libraries/luasocket/libluasocket/except.c
  1461.     src/libraries/luasocket/libluasocket/except.h
  1462.     src/libraries/luasocket/libluasocket/ftp.lua.h
  1463.     src/libraries/luasocket/libluasocket/headers.lua.h
  1464.     src/libraries/luasocket/libluasocket/http.lua.h
  1465.     src/libraries/luasocket/libluasocket/inet.c
  1466.     src/libraries/luasocket/libluasocket/inet.h
  1467.     src/libraries/luasocket/libluasocket/io.c
  1468.     src/libraries/luasocket/libluasocket/io.h
  1469.     src/libraries/luasocket/libluasocket/ltn12.lua.h
  1470.     src/libraries/luasocket/libluasocket/luasocket.c
  1471.     src/libraries/luasocket/libluasocket/luasocket.h
  1472.     src/libraries/luasocket/libluasocket/mbox.lua.h
  1473.     src/libraries/luasocket/libluasocket/mime.c
  1474.     src/libraries/luasocket/libluasocket/mime.h
  1475.     src/libraries/luasocket/libluasocket/mime.lua.h
  1476.     src/libraries/luasocket/libluasocket/options.c
  1477.     src/libraries/luasocket/libluasocket/options.h
  1478.     src/libraries/luasocket/libluasocket/pierror.h
  1479.     src/libraries/luasocket/libluasocket/select.c
  1480.     src/libraries/luasocket/libluasocket/select.h
  1481.     src/libraries/luasocket/libluasocket/smtp.lua.h
  1482.     src/libraries/luasocket/libluasocket/socket.h
  1483.     src/libraries/luasocket/libluasocket/socket.lua.h
  1484.     src/libraries/luasocket/libluasocket/tcp.c
  1485.     src/libraries/luasocket/libluasocket/tcp.h
  1486.     src/libraries/luasocket/libluasocket/timeout.c
  1487.     src/libraries/luasocket/libluasocket/timeout.h
  1488.     src/libraries/luasocket/libluasocket/tp.lua.h
  1489.     src/libraries/luasocket/libluasocket/udp.c
  1490.     src/libraries/luasocket/libluasocket/udp.h
  1491.     src/libraries/luasocket/libluasocket/url.lua.h
  1492. )
  1493.  
  1494. set(LOVE_LINK_L3P_LUASOCKET_LIBLUASOCKET)
  1495.  
  1496. if(MSVC)
  1497.     set(LOVE_SRC_3P_LUASOCKET_LIBLUASOCKET
  1498.         ${LOVE_SRC_3P_LUASOCKET_LIBLUASOCKET}
  1499.         src/libraries/luasocket/libluasocket/wsocket.c
  1500.         src/libraries/luasocket/libluasocket/wsocket.h
  1501.     )
  1502.  
  1503.     set(LOVE_LINK_L3P_LUASOCKET_LIBLUASOCKET
  1504.         ${LOVE_LINK_L3P_LUASOCKET_LIBLUASOCKET}
  1505.         ws2_32.lib
  1506.     )
  1507. else()
  1508.     set(LOVE_SRC_3P_LUASOCKET_LIBLUASOCKET
  1509.         ${LOVE_SRC_3P_LUASOCKET_LIBLUASOCKET}
  1510.         src/libraries/luasocket/libluasocket/serial.c
  1511.         src/libraries/luasocket/libluasocket/unix.c
  1512.         src/libraries/luasocket/libluasocket/unix.h
  1513.         src/libraries/luasocket/libluasocket/unixtcp.c
  1514.         src/libraries/luasocket/libluasocket/unixtcp.h
  1515.         src/libraries/luasocket/libluasocket/unixudp.c
  1516.         src/libraries/luasocket/libluasocket/unixudp.h
  1517.         src/libraries/luasocket/libluasocket/usocket.c
  1518.         src/libraries/luasocket/libluasocket/usocket.h
  1519.     )
  1520. endif()
  1521.  
  1522. set(LOVE_SRC_3P_LUASOCKET
  1523.     ${LOVE_SRC_3P_LUASOCKET_ROOT}
  1524.     ${LOVE_SRC_3P_LUASOCKET_LIBLUASOCKET}
  1525. )
  1526.  
  1527. add_library(love_3p_luasocket ${LOVE_SRC_3P_LUASOCKET})
  1528. target_link_libraries(love_3p_luasocket ${LOVE_LUA_LIBRARY} ${LOVE_LINK_L3P_LUASOCKET_LIBLUASOCKET})
  1529.  
  1530. #
  1531. # APIs from Lua 5.3
  1532. #
  1533.  
  1534. set(LOVE_SRC_3P_LUA53
  1535.     src/libraries/lua53/lprefix.h
  1536.     src/libraries/lua53/lstrlib.c
  1537.     src/libraries/lua53/lstrlib.h
  1538.     src/libraries/lua53/lutf8lib.c
  1539.     src/libraries/lua53/lutf8lib.h
  1540. )
  1541.  
  1542. add_library(love_3p_lua53 ${LOVE_SRC_3P_LUA53})
  1543. target_link_libraries(love_3p_lua53 ${LOVE_LUA_LIBRARY})
  1544.  
  1545. #
  1546. # lz4
  1547. #
  1548.  
  1549. set(LOVE_SRC_3P_LZ4
  1550.     src/libraries/lz4/lz4.c
  1551.     src/libraries/lz4/lz4.h
  1552.     src/libraries/lz4/lz4hc.c
  1553.     src/libraries/lz4/lz4hc.h
  1554.     src/libraries/lz4/lz4opt.h
  1555. )
  1556.  
  1557. add_library(love_3p_lz4 ${LOVE_SRC_3P_LZ4})
  1558.  
  1559. #
  1560. # noise1234
  1561. #
  1562.  
  1563. set(LOVE_SRC_3P_NOISE1234
  1564.     src/libraries/noise1234/noise1234.cpp
  1565.     src/libraries/noise1234/noise1234.h
  1566.     src/libraries/noise1234/simplexnoise1234.cpp
  1567.     src/libraries/noise1234/simplexnoise1234.h
  1568. )
  1569.  
  1570. add_library(love_3p_noise1234 ${LOVE_SRC_3P_NOISE1234})
  1571.  
  1572. #
  1573. # physfs
  1574. #
  1575.  
  1576. set(LOVE_SRC_3P_PHYSFS
  1577.     src/libraries/physfs/physfs_archiver_7z.c
  1578.     src/libraries/physfs/physfs_archiver_dir.c
  1579.     src/libraries/physfs/physfs_archiver_grp.c
  1580.     src/libraries/physfs/physfs_archiver_hog.c
  1581.     src/libraries/physfs/physfs_archiver_iso9660.c
  1582.     src/libraries/physfs/physfs_archiver_mvl.c
  1583.     src/libraries/physfs/physfs_archiver_qpak.c
  1584.     src/libraries/physfs/physfs_archiver_slb.c
  1585.     src/libraries/physfs/physfs_archiver_unpacked.c
  1586.     src/libraries/physfs/physfs_archiver_vdf.c
  1587.     src/libraries/physfs/physfs_archiver_wad.c
  1588.     src/libraries/physfs/physfs_archiver_zip.c
  1589.     src/libraries/physfs/physfs_byteorder.c
  1590.     src/libraries/physfs/physfs_casefolding.h
  1591.     src/libraries/physfs/physfs_internal.h
  1592.     src/libraries/physfs/physfs_lzmasdk.h
  1593.     src/libraries/physfs/physfs_miniz.h
  1594.     src/libraries/physfs/physfs_platform_haiku.cpp
  1595.     src/libraries/physfs/physfs_platform_os2.c
  1596.     src/libraries/physfs/physfs_platform_posix.c
  1597.     src/libraries/physfs/physfs_platform_qnx.c
  1598.     src/libraries/physfs/physfs_platform_unix.c
  1599.     src/libraries/physfs/physfs_platform_windows.c
  1600.     src/libraries/physfs/physfs_platform_winrt.cpp
  1601.     src/libraries/physfs/physfs_platforms.h
  1602.     src/libraries/physfs/physfs_unicode.c
  1603.     src/libraries/physfs/physfs.c
  1604.     src/libraries/physfs/physfs.h
  1605. )
  1606.  
  1607. if(APPLE)
  1608.     set(LOVE_SRC_3P_PHYSFS ${LOVE_SRC_3P_PHYSFS}
  1609.         src/libraries/physfs/physfs_platform_apple.m
  1610.     )
  1611. endif()
  1612.  
  1613. add_library(love_3p_physfs ${LOVE_SRC_3P_PHYSFS})
  1614.  
  1615. #
  1616. # stb_image
  1617. #
  1618.  
  1619. set(LOVE_SRC_3P_STB
  1620.     src/libraries/stb/stb_image.h
  1621. )
  1622.  
  1623. # stb_image has no implementation files of its own.
  1624.  
  1625. #
  1626. # tiny exr
  1627. #
  1628.  
  1629. set(LOVE_SRC_3P_TINYEXR
  1630.     src/libraries/tinyexr/tinyexr.h
  1631. )
  1632.  
  1633. # tinyexr has no implementation files of its own.
  1634.  
  1635. #
  1636. # utf8
  1637. #
  1638.  
  1639. set(LOVE_SRC_3P_UTF8_ROOT src/libraries/utf8/utf8.h)
  1640.  
  1641. set(LOVE_SRC_3P_UTF8_UTF8
  1642.     src/libraries/utf8/utf8/checked.h
  1643.     src/libraries/utf8/utf8/core.h
  1644.     src/libraries/utf8/utf8/unchecked.h
  1645. )
  1646.  
  1647. set(LOVE_SRC_3P_UTF8
  1648.     ${LOVE_SRC_3P_UTF8_ROOT}
  1649.     ${LOVE_SRC_3P_UTF8_UTF8}
  1650. )
  1651.  
  1652. # This library is all headers ... so there is no need to
  1653. # add_library() here.
  1654.  
  1655. #
  1656. # Wuff
  1657. #
  1658.  
  1659. set(LOVE_SRC_3P_WUFF
  1660.     src/libraries/Wuff/wuff.c
  1661.     src/libraries/Wuff/wuff.h
  1662.     src/libraries/Wuff/wuff_config.h
  1663.     src/libraries/Wuff/wuff_convert.c
  1664.     src/libraries/Wuff/wuff_convert.h
  1665.     src/libraries/Wuff/wuff_internal.c
  1666.     src/libraries/Wuff/wuff_internal.h
  1667.     src/libraries/Wuff/wuff_memory.c
  1668. )
  1669.  
  1670. add_library(love_3p_wuff ${LOVE_SRC_3P_WUFF})
  1671.  
  1672. #
  1673. # xxHash
  1674. #
  1675.  
  1676. set(LOVE_SRC_3P_XXHASH
  1677.     src/libraries/xxHash/xxhash.c
  1678.     src/libraries/xxHash/xxhash.h
  1679. )
  1680.  
  1681. add_library(love_3p_xxhash ${LOVE_SRC_3P_XXHASH})
  1682.  
  1683. set(LOVE_3P
  1684.     love_3p_box2d
  1685.     love_3p_ddsparse
  1686.     love_3p_enet
  1687.     love_3p_glad
  1688.     love_3p_glslang
  1689.     love_3p_lodepng
  1690.     love_3p_luasocket
  1691.     love_3p_lua53
  1692.     love_3p_lz4
  1693.     love_3p_noise1234
  1694.     love_3p_physfs
  1695.     love_3p_wuff
  1696.     love_3p_xxhash
  1697. )
  1698.  
  1699. love_disable_warnings(love_3p_box2d love_3p_enet love_3p_luasocket love_3p_physfs)
  1700.  
  1701. #
  1702. # liblove
  1703. #
  1704. set(LOVE_LIB_SRC
  1705.     ${LOVE_SRC_COMMON}
  1706.     # Modules
  1707.     ${LOVE_SRC_MODULE_AUDIO}
  1708.     ${LOVE_SRC_MODULE_DATA}
  1709.     ${LOVE_SRC_MODULE_EVENT}
  1710.     ${LOVE_SRC_MODULE_FILESYSTEM}
  1711.     ${LOVE_SRC_MODULE_FONT}
  1712.     ${LOVE_SRC_MODULE_GRAPHICS}
  1713.     ${LOVE_SRC_MODULE_IMAGE}
  1714.     ${LOVE_SRC_MODULE_JOYSTICK}
  1715.     ${LOVE_SRC_MODULE_KEYBOARD}
  1716.     ${LOVE_SRC_MODULE_LOVE}
  1717.     ${LOVE_SRC_MODULE_MATH}
  1718.     ${LOVE_SRC_MODULE_MOUSE}
  1719.     ${LOVE_SRC_MODULE_PHYSICS}
  1720.     ${LOVE_SRC_MODULE_SOUND}
  1721.     ${LOVE_SRC_MODULE_SYSTEM}
  1722.     ${LOVE_SRC_MODULE_THREAD}
  1723.     ${LOVE_SRC_MODULE_TIMER}
  1724.     ${LOVE_SRC_MODULE_TOUCH}
  1725.     ${LOVE_SRC_MODULE_VIDEO}
  1726.     ${LOVE_SRC_MODULE_WINDOW}
  1727. )
  1728.  
  1729. include_directories(
  1730.     src
  1731.     src/libraries
  1732.     src/modules
  1733.     ${LOVE_INCLUDE_DIRS}
  1734. )
  1735.  
  1736. link_directories(${LOVE_LINK_DIRS})
  1737.  
  1738. set(LOVE_RC)
  1739.  
  1740. if(MSVC)
  1741.     set(LOVE_LINK_LIBRARIES ${LOVE_LINK_LIBRARIES}
  1742.         ws2_32.lib
  1743.         winmm.lib
  1744.     )
  1745.  
  1746.     set(LOVE_RC
  1747.         extra/windows/love.rc
  1748.         extra/windows/love.ico
  1749.     )
  1750. endif()
  1751.  
  1752. add_library(${LOVE_LIB_NAME} SHARED ${LOVE_LIB_SRC} ${LOVE_RC})
  1753. target_link_libraries(${LOVE_LIB_NAME} ${LOVE_LINK_LIBRARIES} ${LOVE_3P})
  1754.  
  1755. if(LOVE_EXTRA_DEPENDECIES)
  1756.     add_dependencies(${LOVE_LIB_NAME} ${LOVE_EXTRA_DEPENDECIES})
  1757. endif()
  1758.  
  1759. if(MSVC)
  1760.     set_target_properties(${LOVE_LIB_NAME} PROPERTIES RELEASE_OUTPUT_NAME "love" PDB_NAME "liblove" IMPORT_PREFIX "lib")
  1761.     set_target_properties(${LOVE_LIB_NAME} PROPERTIES DEBUG_OUTPUT_NAME "love" PDB_NAME "liblove" IMPORT_PREFIX "lib")
  1762. endif()
  1763.  
  1764. #
  1765. # love (executable)
  1766. #
  1767. add_executable(${LOVE_EXE_NAME} WIN32 src/love.cpp ${LOVE_RC})
  1768. target_link_libraries(${LOVE_EXE_NAME} ${LOVE_LIB_NAME})
  1769.  
  1770. if(MSVC)
  1771.     add_executable(${LOVE_CONSOLE_EXE_NAME} src/love.cpp ${LOVE_RC})
  1772.     target_link_libraries(${LOVE_CONSOLE_EXE_NAME} ${LOVE_LIB_NAME})
  1773. endif()
  1774.  
  1775. function(post_step_move_dll ARG_POST_TARGET ARG_TARGET_OR_FILE)
  1776.     if(TARGET ${ARG_TARGET_OR_FILE})
  1777.         add_custom_command(TARGET ${ARG_POST_TARGET} POST_BUILD
  1778.             COMMAND ${CMAKE_COMMAND} -E copy
  1779.             $<TARGET_FILE:${ARG_TARGET_OR_FILE}>
  1780.             ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/$<TARGET_FILE_NAME:${ARG_TARGET_OR_FILE}>)
  1781.     else()
  1782.         get_filename_component(TEMP_FILENAME ${ARG_TARGET_OR_FILE} NAME)
  1783.         add_custom_command(TARGET ${ARG_POST_TARGET} POST_BUILD
  1784.             COMMAND ${CMAKE_COMMAND} -E copy
  1785.             ${ARG_TARGET_OR_FILE}
  1786.             ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/${TEMP_FILENAME})
  1787.     endif()
  1788. endfunction()
  1789.  
  1790. # Add post build steps to move the DLLs next to the binary. Otherwise
  1791. # running/debugging the binary will not work from inside VS.
  1792. if(LOVE_MOVE_DLLS)
  1793.     foreach(DLL ${LOVE_MOVE_DLLS})
  1794.         post_step_move_dll(love ${DLL})
  1795.     endforeach()
  1796. endif()
  1797.  
  1798. if (NOT MSVC)
  1799.     return()
  1800. endif()
  1801.  
  1802. ###################################
  1803. # Version
  1804. ###################################
  1805.  
  1806. # Extract version.h contents.
  1807. file(READ ${CMAKE_CURRENT_SOURCE_DIR}/src/common/version.h LOVE_VERSION_FILE_CONTENTS)
  1808.  
  1809. # Extract one of LOVE_VERSION_MAJOR/MINOR/REV.
  1810. function(match_version ARG_STRING OUT_VAR)
  1811.     string(REGEX MATCH "VERSION_${ARG_STRING} = ([0-9]+);" TMP_VER "${LOVE_VERSION_FILE_CONTENTS}")
  1812.     string(REGEX MATCH "[0-9]+" TMP_VER "${TMP_VER}")
  1813.     set(${OUT_VAR} ${TMP_VER} PARENT_SCOPE)
  1814. endfunction()
  1815.  
  1816. match_version("MAJOR" LOVE_VERSION_MAJOR)
  1817. match_version("MINOR" LOVE_VERSION_MINOR)
  1818. match_version("REV" LOVE_VERSION_REV)
  1819.  
  1820. set(LOVE_VERSION_STR "${LOVE_VERSION_MAJOR}.${LOVE_VERSION_MINOR}")
  1821.  
  1822. message(STATUS "Version: ${LOVE_VERSION_STR}")
  1823.  
  1824. ###################################
  1825. # CPack
  1826. ###################################
  1827. install(TARGETS ${LOVE_EXE_NAME} ${LOVE_CONSOLE_EXE_NAME} ${LOVE_LIB_NAME} RUNTIME DESTINATION .)
  1828.  
  1829. # Extra DLLs.
  1830. if(LOVE_EXTRA_DLLS)
  1831.     foreach(DLL ${LOVE_EXTRA_DLLS})
  1832.         get_filename_component(DLL_NAME ${DLL} NAME)
  1833.         message(STATUS "Extra DLL: ${DLL_NAME}")
  1834.     endforeach()
  1835.     install(FILES ${LOVE_EXTRA_DLLS} DESTINATION .)
  1836. endif()
  1837.  
  1838. # Dynamic runtime libs.
  1839. if(LOVE_MSVC_DLLS)
  1840.     foreach(DLL ${LOVE_MSVC_DLLS})
  1841.         get_filename_component(DLL_NAME ${DLL} NAME)
  1842.         message(STATUS "Runtime DLL: ${DLL_NAME}")
  1843.     endforeach()
  1844.     install(FILES ${LOVE_MSVC_DLLS} DESTINATION .)
  1845. endif()
  1846.  
  1847. # Copy a text file from CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_BINARY_DIR.
  1848. # On Windows, this function will convert line endings to CR,LF.
  1849. function(copy_text_file ARG_FILE_IN ARG_FILE_OUT)
  1850.     file(READ ${CMAKE_CURRENT_SOURCE_DIR}/${ARG_FILE_IN} TMP_TXT_CONTENTS)
  1851.     file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${ARG_FILE_OUT} ${TMP_TXT_CONTENTS})
  1852. endfunction()
  1853.  
  1854. # Text files.
  1855. copy_text_file(readme.md readme.txt)
  1856. copy_text_file(license.txt license.txt)
  1857. copy_text_file(changes.txt changes.txt)
  1858.  
  1859. install(FILES
  1860.         ${CMAKE_CURRENT_BINARY_DIR}/changes.txt
  1861.         ${CMAKE_CURRENT_BINARY_DIR}/license.txt
  1862.         ${CMAKE_CURRENT_BINARY_DIR}/readme.txt
  1863.         DESTINATION .)
  1864.  
  1865. # Icons
  1866. install(FILES
  1867.         ${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis/love.ico
  1868.         ${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis/game.ico
  1869.         DESTINATION .)
  1870.  
  1871. set(CPACK_GENERATOR ZIP NSIS)
  1872. set(CPACK_PACKAGE_NAME "love")
  1873. set(CPACK_PACKAGE_VENDOR "love2d.org")
  1874. set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LOVE -- It's awesome")
  1875. set(CPACK_PACKAGE_VERSION "${LOVE_VERSION_STR}")
  1876. set(CPACK_PACKAGE_VERSION_MAJOR "${LOVE_VERSION_MAJOR}")
  1877. set(CPACK_PACKAGE_VERSION_MINOR "${LOVE_VERSION_MINOR}")
  1878. set(CPACK_PACKAGE_VERSION_PATCH "${LOVE_VERSION_REV}")
  1879. set(CPACK_PACKAGE_INSTALL_DIRECTORY "LOVE")
  1880. set(CPACK_PACKAGE_EXECUTABLES "${LOVE_EXE_NAME};LOVE")
  1881. set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/readme.md")
  1882. set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.txt")
  1883.  
  1884. set(CPACK_NSIS_EXECUTABLES_DIRECTORY .)
  1885. set(CPACK_NSIS_PACKAGE_NAME "LOVE")
  1886. set(CPACK_NSIS_DISPLAY_NAME "LOVE ${LOVE_VERSION_STR}")
  1887. set(CPACK_NSIS_MODIFY_PATH OFF)
  1888.  
  1889. if(LOVE_X64)
  1890.     set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
  1891. else()
  1892.     set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
  1893. endif()
  1894.  
  1895. set(CPACK_NSIS_MENU_LINKS "http://love2d.org/wiki" "Documentation")
  1896.  
  1897. # Some bug somewhere in NSIS requires "\\\\" somewhere in the path,
  1898. # according to The Internet. (And sure enough, it does not work
  1899. # without it).
  1900. set(NSIS_LEFT_BMP "${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis\\\\left.bmp")
  1901. set(NSIS_TOP_BMP "${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis\\\\top.bmp")
  1902. set(NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis\\\\love.ico")
  1903. set(NSIS_MUI_UNICON "${CMAKE_CURRENT_SOURCE_DIR}/extra/nsis\\\\love.ico")
  1904.  
  1905. set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "
  1906.     !define MUI_WELCOMEPAGE_TITLE \\\"LOVE ${LOVE_VERSION_STR} Setup\\\"
  1907.     !define MUI_WELCOMEFINISHPAGE_BITMAP \\\"${NSIS_LEFT_BMP}\\\"
  1908.     !define MUI_HEADERIMAGE_BITMAP \\\"${NSIS_TOP_BMP}\\\"
  1909.     !define MUI_ICON \\\"${NSIS_MUI_ICON}\\\"
  1910.     !define MUI_UNICON \\\"${NSIS_MUI_UNICON}\\\"
  1911. ")
  1912.  
  1913. set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
  1914.     WriteRegStr HKCR \\\".love\\\" \\\"\\\" \\\"LOVE\\\"
  1915.     WriteRegStr HKCR \\\"LOVE\\\" \\\"\\\" \\\"LOVE Game File\\\"
  1916.     WriteRegStr HKCR \\\"LOVE\\\\DefaultIcon\\\" \\\"\\\" \\\"$INSTDIR\\\\game.ico\\\"
  1917.     WriteRegStr HKCR \\\"LOVE\\\\shell\\\" \\\"\\\" \\\"open\\\"
  1918.     WriteRegStr HKCR \\\"LOVE\\\\shell\\\\open\\\" \\\"\\\" \\\"Open in LOVE\\\"
  1919.     WriteRegStr HKCR \\\"LOVE\\\\shell\\\\open\\\\command\\\" \\\"\\\" \\\"$INSTDIR\\\\love.exe $\\\\\\\"%1$\\\\\\\"\\\"
  1920.     System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v  (0x08000000, 0, 0, 0)'
  1921. ")
  1922.  
  1923. set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
  1924.     DeleteRegKey HKCR \\\"LOVE\\\"
  1925.     DeleteRegKey HKCR \\\".love\\\"
  1926.     System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v  (0x08000000, 0, 0, 0)'
  1927. ")
  1928.  
  1929. include(CPack)
  1930.  
Advertisement
RAW Paste Data Copied
Advertisement