A premake add-on module helps to find the most suitable fbx sdk location to use.
- Windows
Currently, you can reference CI status in project CatDogEngine/AssetPipeline.
Autodesk FBX is an industry standard 3D model file format but FBX SDK is under a commericial license. Maybe not friendly to integrate sdk to your project directly.
Parse FBX ASCII file is also a solution to avoid sdk integration, such as Godot FBX importer and nem0/OpenFBX. But it costs much time and efforts.
-
Put this module under Premake Search Paths
-
Integrate it in your premake script
find_fbxsdk = require("premake-findfbx")
-
In module scope
-- [Optional] config module options find_fbxsdk.dump_information = true -- Check if module can find a valid sdk locatiion local sdkLocation = find_fbxsdk.get_sdk_location() local isValid = sdkLocation ~= nil and os.isdir(sdkLocation)
Note that if you don't install fbxsdk in default location such as "C:\Program Files\Autodesk\FBX\FBX SDK\xxxx.x.x" in Windows. You have to use custom_sdk_directory option.
find_fbxsdk.custom_sdk_directory = "D:/fbx"
-
In project scope
-- Default options find_fbxsdk.project_config() -- With options -- find_fbxsdk.config_project({ static_runtime = false })
Then it will generate includedirs, libdirs, links, postbuildcommands which copy fbxsdk shared libs to your project build target's output directory.
- custom_sdk_directory
- type : string
- A valid abosulte directory path
- default : nil
- Search this path at first if not nil. Fallback to search system installed directories.
- type : string
- dump_information
- type : boolean
- default : true
- true : Dump useful information such as include directories, link library paths for debug purpose.
- false : No Dump
- copy_shared_libs
- type : boolean
- default : true
- true : Copy shared libararies to your project build target's output directory.
- false : No Copy
- static_runtime
- type : boolean
- default : true
- true : /MT
- false : /MD