split cmgen into an exe + libibl.a
This commit is contained in:
committed by
Mathias Agopian
parent
529c44e548
commit
f8fc2dd808
@@ -342,6 +342,7 @@ add_subdirectory(${LIBRARIES}/filabridge)
|
||||
add_subdirectory(${LIBRARIES}/filaflat)
|
||||
add_subdirectory(${LIBRARIES}/filameshio)
|
||||
add_subdirectory(${LIBRARIES}/geometry)
|
||||
add_subdirectory(${LIBRARIES}/ibl)
|
||||
add_subdirectory(${LIBRARIES}/image)
|
||||
add_subdirectory(${LIBRARIES}/math)
|
||||
add_subdirectory(${LIBRARIES}/utils)
|
||||
|
||||
51
libs/ibl/CMakeLists.txt
Normal file
51
libs/ibl/CMakeLists.txt
Normal file
@@ -0,0 +1,51 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
project(cmgen)
|
||||
|
||||
set(TARGET ibl)
|
||||
set(PUBLIC_HDR_DIR include)
|
||||
|
||||
# ==================================================================================================
|
||||
# Sources and headers
|
||||
# ==================================================================================================
|
||||
set(PUBLIC_HDRS
|
||||
${PUBLIC_HDR_DIR}/ibl/Cubemap.h
|
||||
${PUBLIC_HDR_DIR}/ibl/CubemapIBL.h
|
||||
${PUBLIC_HDR_DIR}/ibl/CubemapSH.h
|
||||
${PUBLIC_HDR_DIR}/ibl/CubemapUtils.h
|
||||
${PUBLIC_HDR_DIR}/ibl/Image.h
|
||||
${PUBLIC_HDR_DIR}/ibl/utilities.h
|
||||
)
|
||||
|
||||
set(SRCS
|
||||
src/Cubemap.cpp
|
||||
src/CubemapIBL.cpp
|
||||
src/CubemapSH.cpp
|
||||
src/CubemapUtils.cpp
|
||||
src/Image.cpp
|
||||
)
|
||||
|
||||
# ==================================================================================================
|
||||
# Target definitions
|
||||
# ==================================================================================================
|
||||
include_directories(${PUBLIC_HDR_DIR})
|
||||
|
||||
add_library(${TARGET} ${PUBLIC_HDRS} ${SRCS})
|
||||
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
|
||||
|
||||
target_link_libraries(${TARGET} math utils image)
|
||||
|
||||
# ==================================================================================================
|
||||
# Compile options and optimizations
|
||||
# ==================================================================================================
|
||||
if (MSVC OR CLANG_CL)
|
||||
target_compile_options(${TARGET} PRIVATE /fp:fast)
|
||||
else()
|
||||
target_compile_options(${TARGET} PRIVATE -ffast-math)
|
||||
endif()
|
||||
|
||||
|
||||
# ==================================================================================================
|
||||
# Installation
|
||||
# ==================================================================================================
|
||||
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
|
||||
install(DIRECTORY ${PUBLIC_HDR_DIR}/ibl DESTINATION include)
|
||||
@@ -17,7 +17,7 @@
|
||||
#ifndef SRC_CUBEMAP_H_
|
||||
#define SRC_CUBEMAP_H_
|
||||
|
||||
#include "Image.h"
|
||||
#include <ibl/Image.h>
|
||||
|
||||
#include <utils/compiler.h>
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
#ifndef SRC_CUBEMAPUTILS_H_
|
||||
#define SRC_CUBEMAPUTILS_H_
|
||||
|
||||
#include <utils/JobSystem.h>
|
||||
#include <ibl/Cubemap.h>
|
||||
#include <ibl/Image.h>
|
||||
|
||||
#include "Cubemap.h"
|
||||
#include "Image.h"
|
||||
#include <utils/JobSystem.h>
|
||||
|
||||
class CubemapUtils {
|
||||
public:
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "Cubemap.h"
|
||||
#include <ibl/Cubemap.h>
|
||||
|
||||
using namespace filament::math;
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "CubemapIBL.h"
|
||||
#include <ibl/CubemapIBL.h>
|
||||
|
||||
#include "Cubemap.h"
|
||||
#include "CubemapUtils.h"
|
||||
#include "utilities.h"
|
||||
#include <ibl/Cubemap.h>
|
||||
#include <ibl/CubemapUtils.h>
|
||||
#include <ibl/utilities.h>
|
||||
|
||||
#include <utils/JobSystem.h>
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "CubemapSH.h"
|
||||
#include <ibl/CubemapSH.h>
|
||||
|
||||
#include "Cubemap.h"
|
||||
#include "CubemapUtils.h"
|
||||
#include "utilities.h"
|
||||
#include <ibl/Cubemap.h>
|
||||
#include <ibl/CubemapUtils.h>
|
||||
#include <ibl/utilities.h>
|
||||
|
||||
#include <math/mat4.h>
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "CubemapUtils.h"
|
||||
#include <ibl/CubemapUtils.h>
|
||||
|
||||
#include "utilities.h"
|
||||
#include <ibl/utilities.h>
|
||||
|
||||
#include <utils/JobSystem.h>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "Image.h"
|
||||
#include <ibl/Image.h>
|
||||
|
||||
#include <utility>
|
||||
|
||||
@@ -8,22 +8,11 @@ set(TARGET cmgen)
|
||||
# ==================================================================================================
|
||||
set(HDRS
|
||||
src/JobQueue.h
|
||||
src/Cubemap.h
|
||||
src/CubemapIBL.h
|
||||
src/CubemapSH.h
|
||||
src/CubemapUtils.h
|
||||
src/Image.h
|
||||
src/ProgressUpdater.h
|
||||
src/utilities.h
|
||||
)
|
||||
|
||||
set(SRCS
|
||||
src/cmgen.cpp
|
||||
src/Cubemap.cpp
|
||||
src/CubemapIBL.cpp
|
||||
src/CubemapSH.cpp
|
||||
src/CubemapUtils.cpp
|
||||
src/Image.cpp
|
||||
src/JobQueue.cpp
|
||||
src/ProgressUpdater.cpp
|
||||
)
|
||||
@@ -33,7 +22,7 @@ set(SRCS
|
||||
# ==================================================================================================
|
||||
add_executable(${TARGET} ${HDRS} ${SRCS})
|
||||
|
||||
target_link_libraries(${TARGET} PRIVATE math utils z image imageio getopt)
|
||||
target_link_libraries(${TARGET} PRIVATE math utils ibl z image imageio getopt)
|
||||
|
||||
# ==================================================================================================
|
||||
# Compile options and optimizations
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "Cubemap.h"
|
||||
#include "CubemapIBL.h"
|
||||
#include "CubemapSH.h"
|
||||
#include "CubemapUtils.h"
|
||||
#include "ProgressUpdater.h"
|
||||
#include "Image.h"
|
||||
|
||||
#include "utilities.h"
|
||||
#include <ibl/Cubemap.h>
|
||||
#include <ibl/CubemapIBL.h>
|
||||
#include <ibl/CubemapSH.h>
|
||||
#include <ibl/CubemapUtils.h>
|
||||
#include <ibl/Image.h>
|
||||
#include <ibl/utilities.h>
|
||||
|
||||
#include <imageio/BlockCompression.h>
|
||||
#include <imageio/ImageDecoder.h>
|
||||
|
||||
Reference in New Issue
Block a user