Visual Studio:
~sdk/source/VisualStudio2019.sln
~sdk/source/VisualStudio2022.sln
Make a copy of the appropriate file below as just 'Makefile'. Make any desired modifications (eg. specific architecture flags such as those for AVX or NEON) then 'make':
~sdk/source/Makefile_linux_arm8_clang_*
~sdk/source/Makefile_linux_arm8_gcc_*
~sdk/source/Makefile_linux_arm8_icpc_*
~sdk/source/Makefile_linux_x64_clang_*
~sdk/source/Makefile_linux_x64_gcc_*
~sdk/source/Makefile_linux_x64_icpc_*
Ensure Xcode Command Line Tools are installed.
Make a copy of the appropriate file below as just 'Makefile'. Make any desired modifications then 'make':
~sdk/source/Makefile_macos_x64_clang_debug
~sdk/source/Makefile_macos_x64_clang_release
CMake files are included for integration into other build systems.
~sdk/source/CMakeLists.txt
~sdk/source/*/CMakeLists.txt
Using Android Studio, on any platform:
prj with native C++17 (or greater) support ~sdk/source/ LibTpEigen LibTpStb LibFgBase LibFg3Main (main SDK) LibFg3Photofit (full SDK) fg3PhotofitDll (full SDK) LibFg3Full (full SDK) ~prj/app/src/main/cpp/ ~prj/app/src/main/cpp/CMakeLists.txt
project(...) , add the following line for each library directory above,
in the given order:
add_subdirectory(LibXXX) add_library(prj ...) , add the line:
target_include_directories(prj PUBLIC LibFgXXX) LibFgXXX is one of:
LibFgBase (open source) LibFg3Main (main SDK) LibFg3Full (full SDK) LibFgXXX to the list of target_link_libraries(prj ...)
File -> New -> Folder -> Assets Folder -> main ~prj/app/src/main/assets ) create a facegen
subdirectory. Into that, copy the data you need from ~sdk/data (see Deployment), preserving the subdirectory structure. facegen subdirectory when your app first runs
(example code at ~sdk/source/android/AssetLoaderKotlin.kt ).
This code returns the full path to the local filesystem copy of the FaceGen data.
Pass that path to Fg::setDataDir() before using the SDK (example code at
~sdk/source/android/native-lib.cpp ).
Using Xcode:
~prj ~prj/prj) and File -> 'Add Files to' to add each of the
following directories from ~sdk/source, making sure to deselect all
'add to targets' checkboxes:
LibTpEigen LibTpStb LibFgBase LibFg3Main (main SDK) LibFg3Photofit (full SDK) fg3PhotofitDll (full SDK) LibFg3Full (full SDK) prj target -> Build Settings -> Search Paths -> System Header Search Paths
add:
${SRCROOT}/prj/LibTpEigen/ ${SRCROOT}/prj/LibTpStb/ ${SRCROOT}/prj/LibFgBase/src/ ${SRCROOT}/prj/LibFg3Main/ (main SDK) ${SRCROOT}/prj/LibFg3Photofit/ (full SDK) ${SRCROOT}/prj/LibFg3Full/ (full SDK) prj target -> Build Phases -> Compile Sources, add from
~prj/prj/ :
LibFgBase/src/* LibFgBase/src/nix/* LibFg3Main/*.cpp *.hpp *.h (main SDK) LibFg3Photofit/*.cpp *.hpp *.h (full SDK) fg3PhotofitDll/*.cpp (full SDK) LibFg3Full/*.cpp *.hpp *.h (full SDK) ~prj/prj , select New Group and add
facegen
~prj/prj/facegen , select Add Files to , and
select the data you need (see Deployment), from ~sdk/data ,
preserving the directory structure. Make sure to de-select Add to targets .
Fg::setDataDir()