-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into python_packaging
Signed-off-by: Jonathan Stone <[email protected]>
- Loading branch information
Showing
13 changed files
with
228 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
#define MATERIALX_FILEVERSION @MATERIALX_MAJOR_VERSION@,@MATERIALX_MINOR_VERSION@,@MATERIALX_BUILD_VERSION@,0 | ||
#define MATERIALX_FILEVERSION_STR "@MATERIALX_MAJOR_VERSION@.@MATERIALX_MINOR_VERSION@.@[email protected]\0" | ||
#define MATERIALX_FILENAME_STR "@[email protected]\0" | ||
|
||
1 VERSIONINFO | ||
FILEVERSION MATERIALX_FILEVERSION | ||
PRODUCTVERSION MATERIALX_FILEVERSION | ||
FILEFLAGSMASK 0x3fL | ||
#ifdef _DEBUG | ||
FILEFLAGS 0x1L | ||
#else | ||
FILEFLAGS 0x0L | ||
#endif | ||
FILEOS 0x4L | ||
FILETYPE 0x1L | ||
FILESUBTYPE 0x0L | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040904E4" | ||
BEGIN | ||
VALUE "FileVersion", MATERIALX_FILEVERSION_STR | ||
VALUE "LegalCopyright", "Apache License 2.0\0" | ||
VALUE "OriginalFilename", MATERIALX_FILENAME_STR | ||
VALUE "ProductName", "MaterialX\0" | ||
VALUE "ProductVersion", MATERIALX_FILEVERSION_STR | ||
END | ||
END | ||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x409, 1252 | ||
END | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,53 @@ | ||
set(MATERIALX_MODULE_NAME MaterialXFormat) | ||
|
||
file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") | ||
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*") | ||
|
||
assign_source_group("Source Files" ${materialx_source}) | ||
assign_source_group("Header Files" ${materialx_headers}) | ||
|
||
add_library(MaterialXFormat ${materialx_source} ${materialx_headers}) | ||
add_library(${MATERIALX_MODULE_NAME} ${materialx_source} ${materialx_headers}) | ||
|
||
add_definitions(-DMATERIALX_FORMAT_EXPORTS) | ||
|
||
# Create version resource | ||
if(MATERIALX_BUILD_SHARED_LIBS AND MSVC) | ||
configure_file(${CMAKE_SOURCE_DIR}/cmake/modules/MaterialXVersion.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
target_sources(${MATERIALX_MODULE_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
endif() | ||
|
||
set_target_properties( | ||
MaterialXFormat PROPERTIES | ||
OUTPUT_NAME MaterialXFormat${MATERIALX_LIBNAME_SUFFIX} | ||
${MATERIALX_MODULE_NAME} PROPERTIES | ||
OUTPUT_NAME ${MATERIALX_MODULE_NAME}${MATERIALX_LIBNAME_SUFFIX} | ||
COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}" | ||
LINK_FLAGS "${EXTERNAL_LINK_FLAGS}" | ||
INSTALL_RPATH "${MATERIALX_SAME_DIR_RPATH}" | ||
VERSION "${MATERIALX_LIBRARY_VERSION}" | ||
SOVERSION "${MATERIALX_MAJOR_VERSION}") | ||
|
||
target_link_libraries( | ||
MaterialXFormat | ||
${MATERIALX_MODULE_NAME} | ||
MaterialXCore | ||
${CMAKE_DL_LIBS}) | ||
|
||
target_include_directories(MaterialXFormat | ||
target_include_directories(${MATERIALX_MODULE_NAME} | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../> | ||
$<INSTALL_INTERFACE:${MATERIALX_INSTALL_INCLUDE_PATH}> | ||
PRIVATE | ||
${EXTERNAL_INCLUDE_DIRS}) | ||
|
||
if(NOT SKBUILD) | ||
install(TARGETS MaterialXFormat | ||
install(TARGETS ${MATERIALX_MODULE_NAME} | ||
EXPORT MaterialX | ||
ARCHIVE DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
LIBRARY DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
RUNTIME DESTINATION bin) | ||
|
||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/" | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/MaterialXFormat/ MESSAGE_NEVER | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/${MATERIALX_MODULE_NAME}/ MESSAGE_NEVER | ||
FILES_MATCHING PATTERN "*.h*") | ||
|
||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/MaterialXFormat.pdb" | ||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${MATERIALX_MODULE_NAME}.pdb" | ||
DESTINATION "${MATERIALX_INSTALL_LIB_PATH}/" OPTIONAL) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,54 @@ | ||
set(MATERIALX_MODULE_NAME MaterialXGenGlsl) | ||
|
||
file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") | ||
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*") | ||
|
||
assign_source_group("Source Files" ${materialx_source}) | ||
assign_source_group("Header Files" ${materialx_headers}) | ||
|
||
add_library(MaterialXGenGlsl ${materialx_source} ${materialx_headers}) | ||
add_library(${MATERIALX_MODULE_NAME} ${materialx_source} ${materialx_headers}) | ||
|
||
add_definitions(-DMATERIALX_GENGLSL_EXPORTS) | ||
|
||
# Create version resource | ||
if(MATERIALX_BUILD_SHARED_LIBS AND MSVC) | ||
configure_file(${CMAKE_SOURCE_DIR}/cmake/modules/MaterialXVersion.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
target_sources(${MATERIALX_MODULE_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
endif() | ||
|
||
set_target_properties( | ||
MaterialXGenGlsl PROPERTIES | ||
OUTPUT_NAME MaterialXGenGlsl${MATERIALX_LIBNAME_SUFFIX} | ||
${MATERIALX_MODULE_NAME} PROPERTIES | ||
OUTPUT_NAME ${MATERIALX_MODULE_NAME}${MATERIALX_LIBNAME_SUFFIX} | ||
COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}" | ||
LINK_FLAGS "${EXTERNAL_LINK_FLAGS}" | ||
INSTALL_RPATH "${MATERIALX_SAME_DIR_RPATH}" | ||
VERSION "${MATERIALX_LIBRARY_VERSION}" | ||
SOVERSION "${MATERIALX_MAJOR_VERSION}") | ||
|
||
target_link_libraries( | ||
MaterialXGenGlsl | ||
${MATERIALX_MODULE_NAME} | ||
MaterialXGenShader | ||
MaterialXCore | ||
${CMAKE_DL_LIBS}) | ||
|
||
target_include_directories(MaterialXGenGlsl | ||
target_include_directories(${MATERIALX_MODULE_NAME} | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../> | ||
$<INSTALL_INTERFACE:${MATERIALX_INSTALL_INCLUDE_PATH}> | ||
PRIVATE | ||
${EXTERNAL_INCLUDE_DIRS}) | ||
|
||
if(NOT SKBUILD) | ||
install(TARGETS MaterialXGenGlsl | ||
install(TARGETS ${MATERIALX_MODULE_NAME} | ||
EXPORT MaterialX | ||
ARCHIVE DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
LIBRARY DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
RUNTIME DESTINATION bin) | ||
|
||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/" | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/MaterialXGenGlsl/ MESSAGE_NEVER | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/${MATERIALX_MODULE_NAME}/ MESSAGE_NEVER | ||
FILES_MATCHING PATTERN "*.h*") | ||
|
||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/MaterialXGenGlsl.pdb" | ||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${MATERIALX_MODULE_NAME}.pdb" | ||
DESTINATION "${MATERIALX_INSTALL_LIB_PATH}/" OPTIONAL) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,57 @@ | ||
set(MATERIALX_MODULE_NAME MaterialXGenMdl) | ||
|
||
file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") | ||
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*") | ||
|
||
assign_source_group("Source Files" ${materialx_source}) | ||
assign_source_group("Header Files" ${materialx_headers}) | ||
|
||
add_library(MaterialXGenMdl ${materialx_source} ${materialx_headers}) | ||
add_library(${MATERIALX_MODULE_NAME} ${materialx_source} ${materialx_headers}) | ||
|
||
add_definitions(-DMATERIALX_GENMDL_EXPORTS) | ||
|
||
# Create version resource | ||
if(MATERIALX_BUILD_SHARED_LIBS AND MSVC) | ||
configure_file(${CMAKE_SOURCE_DIR}/cmake/modules/MaterialXVersion.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
target_sources(${MATERIALX_MODULE_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
endif() | ||
|
||
set_target_properties( | ||
MaterialXGenMdl PROPERTIES | ||
OUTPUT_NAME MaterialXGenMdl${MATERIALX_LIBNAME_SUFFIX} | ||
${MATERIALX_MODULE_NAME} PROPERTIES | ||
OUTPUT_NAME ${MATERIALX_MODULE_NAME}${MATERIALX_LIBNAME_SUFFIX} | ||
COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}" | ||
LINK_FLAGS "${EXTERNAL_LINK_FLAGS}" | ||
INSTALL_RPATH "${MATERIALX_SAME_DIR_RPATH}" | ||
VERSION "${MATERIALX_LIBRARY_VERSION}" | ||
SOVERSION "${MATERIALX_MAJOR_VERSION}") | ||
|
||
target_link_libraries( | ||
MaterialXGenMdl | ||
${MATERIALX_MODULE_NAME} | ||
MaterialXGenShader | ||
MaterialXCore | ||
${CMAKE_DL_LIBS}) | ||
|
||
target_include_directories(MaterialXGenMdl | ||
target_include_directories(${MATERIALX_MODULE_NAME} | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../> | ||
$<INSTALL_INTERFACE:${MATERIALX_INSTALL_INCLUDE_PATH}> | ||
PRIVATE | ||
${EXTERNAL_INCLUDE_DIRS}) | ||
|
||
if(NOT SKBUILD) | ||
install(TARGETS MaterialXGenMdl | ||
install(TARGETS ${MATERIALX_MODULE_NAME} | ||
EXPORT MaterialX | ||
ARCHIVE DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
LIBRARY DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
RUNTIME DESTINATION bin) | ||
|
||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/" | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/MaterialXGenMdl/ MESSAGE_NEVER | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/${MATERIALX_MODULE_NAME}/ MESSAGE_NEVER | ||
FILES_MATCHING PATTERN "*.h*") | ||
|
||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/mdl | ||
DESTINATION "${MATERIALX_INSTALL_MDL_MODULE_PATH}") | ||
|
||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/MaterialXGenMdl.pdb" | ||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${MATERIALX_MODULE_NAME}.pdb" | ||
DESTINATION "${MATERIALX_INSTALL_LIB_PATH}/" OPTIONAL) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,54 @@ | ||
set(MATERIALX_MODULE_NAME MaterialXGenMsl) | ||
|
||
file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") | ||
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*") | ||
|
||
assign_source_group("Source Files" ${materialx_source}) | ||
assign_source_group("Header Files" ${materialx_headers}) | ||
|
||
add_library(MaterialXGenMsl ${materialx_source} ${materialx_headers}) | ||
add_library(${MATERIALX_MODULE_NAME} ${materialx_source} ${materialx_headers}) | ||
|
||
add_definitions(-DMATERIALX_GENMSL_EXPORTS) | ||
|
||
# Create version resource | ||
if(MATERIALX_BUILD_SHARED_LIBS AND MSVC) | ||
configure_file(${CMAKE_SOURCE_DIR}/cmake/modules/MaterialXVersion.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
target_sources(${MATERIALX_MODULE_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
endif() | ||
|
||
set_target_properties( | ||
MaterialXGenMsl PROPERTIES | ||
OUTPUT_NAME MaterialXGenMsl${MATERIALX_LIBNAME_SUFFIX} | ||
${MATERIALX_MODULE_NAME} PROPERTIES | ||
OUTPUT_NAME ${MATERIALX_MODULE_NAME}${MATERIALX_LIBNAME_SUFFIX} | ||
COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}" | ||
LINK_FLAGS "${EXTERNAL_LINK_FLAGS}" | ||
INSTALL_RPATH "${MATERIALX_SAME_DIR_RPATH}" | ||
VERSION "${MATERIALX_LIBRARY_VERSION}" | ||
SOVERSION "${MATERIALX_MAJOR_VERSION}") | ||
|
||
target_link_libraries( | ||
MaterialXGenMsl | ||
${MATERIALX_MODULE_NAME} | ||
MaterialXGenShader | ||
MaterialXCore | ||
${CMAKE_DL_LIBS}) | ||
|
||
target_include_directories(MaterialXGenMsl | ||
target_include_directories(${MATERIALX_MODULE_NAME} | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../> | ||
$<INSTALL_INTERFACE:${MATERIALX_INSTALL_INCLUDE_PATH}> | ||
PRIVATE | ||
${EXTERNAL_INCLUDE_DIRS}) | ||
|
||
if(NOT SKBUILD) | ||
install(TARGETS MaterialXGenMsl | ||
install(TARGETS ${MATERIALX_MODULE_NAME} | ||
EXPORT MaterialX | ||
ARCHIVE DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
LIBRARY DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
RUNTIME DESTINATION bin) | ||
|
||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/" | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/MaterialXGenMsl/ MESSAGE_NEVER | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/${MATERIALX_MODULE_NAME}/ MESSAGE_NEVER | ||
FILES_MATCHING PATTERN "*.h*") | ||
|
||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/MaterialXGenMsl.pdb" | ||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${MATERIALX_MODULE_NAME}.pdb" | ||
DESTINATION "${MATERIALX_INSTALL_LIB_PATH}/" OPTIONAL) | ||
endif() |
Oops, something went wrong.