From 0d9aa8182ec00282e211cf37898f1167c55d497c Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 21 Jun 2017 17:10:19 -0400 Subject: [PATCH 1/2] have cmake find fbx library on Linux --- cmake/modules/FindFBX.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/modules/FindFBX.cmake b/cmake/modules/FindFBX.cmake index 7f6a424aa1..2e84d1ea19 100644 --- a/cmake/modules/FindFBX.cmake +++ b/cmake/modules/FindFBX.cmake @@ -29,6 +29,7 @@ string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*$" "\\1" FBX_VERSION_MINOR "${FBX_VER string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" FBX_VERSION_PATCH "${FBX_VERSION}") set(FBX_MAC_LOCATIONS "/Applications/Autodesk/FBX\ SDK/${FBX_VERSION}") +set(FBX_LINUX_LOCATIONS "/usr/local/lib/gcc4/x64/debug/") if (WIN32) string(REGEX REPLACE "\\\\" "/" WIN_PROGRAM_FILES_X64_DIRECTORY $ENV{ProgramW6432}) @@ -36,7 +37,7 @@ endif() set(FBX_WIN_LOCATIONS "${WIN_PROGRAM_FILES_X64_DIRECTORY}/Autodesk/FBX/FBX SDK/${FBX_VERSION}") -set(FBX_SEARCH_LOCATIONS $ENV{FBX_ROOT} ${FBX_ROOT} ${FBX_MAC_LOCATIONS} ${FBX_WIN_LOCATIONS}) +set(FBX_SEARCH_LOCATIONS $ENV{FBX_ROOT} ${FBX_ROOT} ${FBX_MAC_LOCATIONS} ${FBX_WIN_LOCATIONS} ${FBX_LINUX_LOCATIONS}) function(_fbx_append_debugs _endvar _library) if (${_library} AND ${_library}_DEBUG) @@ -94,6 +95,8 @@ elseif (APPLE) find_library(SYSTEM_CONFIGURATION NAMES SystemConfiguration) _fbx_find_library(FBX_LIBRARY libfbxsdk.a release) _fbx_find_library(FBX_LIBRARY_DEBUG libfbxsdk.a debug) +else () + _fbx_find_library(FBX_LIBRARY libfbxsdk.a release) endif() include(FindPackageHandleStandardArgs) From b1119ff46586d83b5873683f26e48837f0712cb0 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 21 Jun 2017 20:10:54 -0700 Subject: [PATCH 2/2] more changes to get oven building on Linux --- tools/oven/CMakeLists.txt | 15 ++++++++++++++- tools/oven/src/Oven.cpp | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/oven/CMakeLists.txt b/tools/oven/CMakeLists.txt index 24c8a9a0e2..f4fca3304c 100644 --- a/tools/oven/CMakeLists.txt +++ b/tools/oven/CMakeLists.txt @@ -4,15 +4,28 @@ setup_hifi_project(Widgets Gui Concurrent) link_hifi_libraries(networking shared image gpu ktx) +setup_memory_debugger() + if (WIN32) package_libraries_for_deployment() endif () +if (UNIX) + find_package(Threads REQUIRED) + if(THREADS_HAVE_PTHREAD_ARG) + target_compile_options(PUBLIC oven "-pthread") + endif() +endif () + # try to find the FBX SDK but fail silently if we don't # because this tool is not built by default find_package(FBX) if (FBX_FOUND) - target_link_libraries(${TARGET_NAME} ${FBX_LIBRARIES}) + if (CMAKE_THREAD_LIBS_INIT) + target_link_libraries(${TARGET_NAME} ${FBX_LIBRARIES} "${CMAKE_THREAD_LIBS_INIT}") + else () + target_link_libraries(${TARGET_NAME} ${FBX_LIBRARIES}) + endif () target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${FBX_INCLUDE_DIR}) endif () diff --git a/tools/oven/src/Oven.cpp b/tools/oven/src/Oven.cpp index a38aaa2b97..dc763cc82d 100644 --- a/tools/oven/src/Oven.cpp +++ b/tools/oven/src/Oven.cpp @@ -18,7 +18,7 @@ #include "ui/OvenMainWindow.h" #include "Oven.h" -#include "BakerCli.h" +#include "BakerCLI.h" static const QString OUTPUT_FOLDER = "/Users/birarda/code/hifi/lod/test-oven/export";