Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- premake5.lua
- -- Declare globals
- --------------------------------------------------------------------------------
- BUILD_DIR = ".build/"
- BIN_DIR = ".bin/"
- LOCAL_INCLUDE = "include/"
- LOCAL_SOURCE = "src/"
- LIBRARY_DIR = ".libraries/"
- EXAMPLE_DIR = "example/"
- WORKSPACE_NAME = "SFML_Project"
- LIBRARY_NAME = "App"
- EXECUTABLE_NAME = "Example"
- SFML_DIR = "SFML-2.3.2-Win32"
- -- !globals
- -- Declare workspaces
- --------------------------------------------------------------------------------
- workspace ( WORKSPACE_NAME )
- configurations ( { "Debug", "Release" } )
- location ( BUILD_DIR )
- -- Declare projects
- ------------------------------------------------------------------------------
- project ( LIBRARY_NAME )
- kind ( "SharedLib" )
- language ( "C++" )
- includedirs ( { LIBRARY_DIR .. SFML_DIR .. "/include", LOCAL_INCLUDE } )
- libdirs ( { LIBRARY_DIR .. SFML_DIR .. "/lib" } )
- location ( BUILD_DIR .. LIBRARY_NAME )
- targetdir ( BIN_DIR .. LIBRARY_NAME .. "/%{cfg.buildcfg}" )
- files ( { LOCAL_INCLUDE .. "**.h", LOCAL_SOURCE .. "**.cpp" } )
- -- Declare filters
- ----------------------------------------------------------------------------
- -- Debug configuration
- filter ( "configurations:Debug" )
- defines ( { "APP_DEBUG", "APP_EXPORTS" } )
- flags ( { "Symbols" } )
- links ( { "sfml-system-d", "sfml-window-d", "sfml-graphics-d" } )
- -- Release configuration
- filter ( "configurations:Release" )
- defines ( { "APP_NDEBUG", "APP_EXPORTS" } )
- optimize ( "On" )
- links ( { "sfml-system", "sfml-window", "sfml-graphics" } )
- -- !filters
- project ( EXECUTABLE_NAME )
- kind ( "ConsoleApp" )
- language ( "C++" )
- includedirs ( { LIBRARY_DIR .. SFML_DIR .. "/include", LOCAL_INCLUDE } )
- libdirs ( { BIN_DIR .. LIBRARY_NAME .. "/%{cfg.buildcfg}" } )
- location ( BUILD_DIR .. EXECUTABLE_NAME )
- targetdir ( BIN_DIR .. EXECUTABLE_NAME .. "/%{cfg.buildcfg}" )
- files ( { EXAMPLE_DIR .. "**.h", EXAMPLE_DIR .. "**.cpp" } )
- -- Declare filters
- ----------------------------------------------------------------------------
- -- Debug configuration
- filter ( "configurations:Debug" )
- defines ( { "EXAMPLPE_DEBUG" } )
- flags ( { "Symbols" } )
- links ( { LIBRARY_NAME } )
- -- Release configuration
- filter ( "configurations:Release" )
- defines ( { "EXAMPLE_NDEBUG" } )
- optimize ( "On" )
- links ( { LIBRARY_NAME } )
- -- !projects
- -- !workspaces
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement