summaryrefslogtreecommitdiff
path: root/XMPCore/build
diff options
context:
space:
mode:
authorHubert Figuière <hub@figuiere.net>2016-12-07 00:03:00 -0500
committerHubert Figuière <hub@figuiere.net>2016-12-07 00:04:31 -0500
commit6071af09b5e263b63e57b28ab8a78484bc65e3fe (patch)
tree45f97ac82e5582684d889ede0fdacaf2c6eddf2e /XMPCore/build
parent606a7df73750084a36fe69651e7b672333a76412 (diff)
Update to XMP SDK CC 2016.07
Diffstat (limited to 'XMPCore/build')
-rw-r--r--XMPCore/build/CMakeLists.txt9
-rw-r--r--XMPCore/build/CMakeListsCommon.txt162
2 files changed, 110 insertions, 61 deletions
diff --git a/XMPCore/build/CMakeLists.txt b/XMPCore/build/CMakeLists.txt
index 9196c4b..7b7ebdd 100644
--- a/XMPCore/build/CMakeLists.txt
+++ b/XMPCore/build/CMakeLists.txt
@@ -9,7 +9,7 @@
# ==============================================================================
# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
+cmake_minimum_required(VERSION 3.5.2)
# Enable folder grouping of projects in IDEs
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
@@ -39,6 +39,13 @@ set(XMP_THIS_PROJECT_RELATIVEPATH "../..")
include(${CMAKE_CURRENT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/build/XMP_Config.cmake)
+add_definitions(-DBUILDING_XMPCORE_LIB=1 -DXMP_COMPONENT_INT_NAMESPACE=AdobeXMPCore_Int)
+if (XMP_BUILD_STATIC)
+ add_definitions(-DBUILDING_XMPCORE_AS_STATIC=1)
+else()
+ add_definitions(-DBUILDING_XMPCORE_AS_DYNAMIC=1)
+endif()
+
set(TP_ZUID_PATH "${XMPROOT_DIR}/third-party/zuid/interfaces")
set(TP_EXPAT_PATH "${PROJECT_ROOT}/../../third-party/expat/lib/")
diff --git a/XMPCore/build/CMakeListsCommon.txt b/XMPCore/build/CMakeListsCommon.txt
index b757273..20bc92a 100644
--- a/XMPCore/build/CMakeListsCommon.txt
+++ b/XMPCore/build/CMakeListsCommon.txt
@@ -24,10 +24,19 @@ list (APPEND INTERNAL_HEADER_FILES
)
source_group("Header Files\\Private\\XMPCore" FILES ${INTERNAL_HEADER_FILES})
-file (GLOB PRIVATE_XMPCOMMON_HEADERS ${XMPROOT_DIR}/XMPCommon/ImplHeaders/*.h)
-source_group("Header Files\\Private\\XMPCommon" FILES ${PRIVATE_XMPCOMMON_HEADERS})
+if (INCLUDE_CPP_DOM_SOURCE)
+ file (GLOB_RECURSE PRIVATE_XMPCOMMON_HEADERS ${XMPROOT_DIR}/XMPCommon/*.h)
+ source_group("Header Files\\Private\\XMPCommon" FILES ${PRIVATE_XMPCOMMON_HEADERS})
-file (GLOB PRIVATE_XMPCORE_HEADERS ${XMPROOT_DIR}/XMPCore/headers/*.h ${XMPROOT_DIR}/XMPCore/Interfaces/*.h)
+ file (GLOB_RECURSE PRIVATE_XMPCOMMON_SOURCES ${XMPROOT_DIR}/XMPCommon/source/*.cpp)
+ source_group("Source Files\\Private\\XMPCommon" FILES ${PRIVATE_XMPCOMMON_SOURCES})
+endif (INCLUDE_CPP_DOM_SOURCE)
+
+file (GLOB PRIVATE_XMPCORE_HEADERS
+ ${XMPROOT_DIR}/XMPCore/*.h
+ ${XMPROOT_DIR}/XMPCore/ImplHeaders/*.h
+ ${XMPROOT_DIR}/XMPCore/headers/*.h
+ ${XMPROOT_DIR}/XMPCore/Interfaces/*.h )
source_group("Header Files\\Private\\XMPCore" FILES ${PRIVATE_XMPCORE_HEADERS})
file (GLOB_RECURSE PUBLIC_CLIENTGLUE_HEADER_FILES ${XMPROOT_DIR}/public/include/client-glue/*.*)
@@ -44,15 +53,31 @@ list (REMOVE_ITEM PUBLIC_HEADER_FILES
)
source_group("Header Files\\Public" FILES ${PUBLIC_HEADER_FILES})
-file (GLOB_RECURSE PUBLIC_XMPCOMMON_HEADERS ${XMPROOT_DIR}/public/include/XMPCommon/*.h ${XMPROOT_DIR}/XMPCommon/*.h)
+file (GLOB_RECURSE PUBLIC_XMPCOMMON_HEADERS ${XMPROOT_DIR}/public/include/XMPCommon/*.h )
source_group("Header Files\\Public\\XMPCommon" FILES ${PUBLIC_XMPCOMMON_HEADERS})
+file (GLOB_RECURSE PUBLIC_XMPCOMMON_SOURCES ${XMPROOT_DIR}/public/include/XMPCommon/source/*.cpp )
+source_group("Source Files\\Public\\XMPCommon" FILES ${PUBLIC_XMPCOMMON_SOURCES})
+
file (GLOB_RECURSE PUBLIC_XMPCORE_HEADERS ${XMPROOT_DIR}/public/include/XMPCore/*.h)
source_group("Header Files\\Public\\XMPCore" FILES ${PUBLIC_XMPCORE_HEADERS})
+file (GLOB_RECURSE PUBLIC_XMPCORE_SOURCES ${XMPROOT_DIR}/public/include/XMPCore/source/*.cpp )
+source_group("Source Files\\Public\\XMPCore" FILES ${PUBLIC_XMPCORE_SOURCES})
+
file (GLOB ABIWRAPPER_SOURCE_FILES ${SOURCE_ROOT}/WXMP*.cpp)
source_group("Source Files\\ABI Wrappers" FILES ${ABIWRAPPER_SOURCE_FILES})
+if (INCLUDE_CPP_DOM_SOURCE)
+ file (GLOB PRIVATE_XMPCORE_ISOURCE_FILES ${SOURCE_ROOT}/*_I.cpp)
+ file (GLOB PRIVATE_XMPCORE_IMPLSOURCE_FILES ${SOURCE_ROOT}/*Impl.cpp)
+ list (REMOVE_ITEM PRIVATE_XMPCORE_IMPLSOURCE_FILES ${SOURCE_ROOT}/XMPCore_Impl.cpp)
+ source_group("Source Files\\Private\\XMPCore" FILES ${PRIVATE_XMPCORE_ISOURCE_FILES} ${PRIVATE_XMPCORE_IMPLSOURCE_FILES})
+else (INCLUDE_CPP_DOM_SOURCE)
+ file (GLOB PRIVATE_XMPCORE_IMPLSOURCE_FILES ${SOURCE_ROOT}/CoreObjectFactoryImpl.cpp)
+ source_group("Source Files\\Private\\XMPCore" FILES ${PRIVATE_XMPCORE_IMPLSOURCE_FILES})
+endif (INCLUDE_CPP_DOM_SOURCE)
+
#XMP Core classes
file (GLOB CORECLASS_SOURCE_FILES ${SOURCE_ROOT}/XMP*.cpp)
list (REMOVE_ITEM CORECLASS_SOURCE_FILES ${SOURCE_ROOT}/XMPCore_Impl.cpp)
@@ -64,12 +89,13 @@ list (APPEND THIRDPARTY_SOURCE_FILES
${TP_EXPAT_PATH}/xmlrole.c
${TP_EXPAT_PATH}/xmltok.c
)
-list (APPEND THIRDPARTY_SOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/expat_config.h)
+if(WIN32)
+ list (APPEND THIRDPARTY_SOURCE_FILES ${RESOURCE_ROOT}/win/expat_config.h)
+else()
+ list (APPEND THIRDPARTY_SOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/expat_config.h)
+endif()
source_group("Source Files\\Third Party" FILES ${THIRDPARTY_SOURCE_FILES})
-file (GLOB XMPCOMMON_SOURCES ${XMPROOT_DIR}/XMPCommon/source/*.cpp)
-source_group("Source Files\\Private\\XMPCommon" FILES ${XMPCOMMON_SOURCES})
-
list (APPEND UTILITY_SOURCE_FILES
${SOURCE_ROOT}/ExpatAdapter.cpp
${SOURCE_ROOT}/ParseRDF.cpp
@@ -81,13 +107,17 @@ list (APPEND UTILITY_SOURCE_FILES
source_group("Source Files\\Utilities" FILES ${UTILITY_SOURCE_FILES})
#resource files
-file (GLOB RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/*.*)
+if (WIN32)
+ file (GLOB RESOURCE_FILES ${RESOURCE_ROOT}/win/*.*)
+else ()
+ file (GLOB RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/*.*)
+endif()
if(WIN32 AND ${XMP_BUILD_STATIC})
list(REMOVE_ITEM RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.rc)
endif()
source_group("Resource Files" FILES ${RESOURCE_FILES})
-if (WIN32 OR (UNIX AND APPLE))
+if (WIN32 OR UNIX)
list(APPEND SOURCE_FILES
${PUBLIC_CLIENTGLUE_HEADER_FILES}
${PUBLIC_HEADER_FILES}
@@ -97,48 +127,35 @@ if (WIN32 OR (UNIX AND APPLE))
${CORECLASS_SOURCE_FILES}
${THIRDPARTY_SOURCE_FILES}
${UTILITY_SOURCE_FILES}
+ ${PRIVATE_XMPCORE_ISOURCE_FILES}
+ ${PRIVATE_XMPCORE_IMPLSOURCE_FILES}
${PRIVATE_XMPCOMMON_HEADERS}
+ ${PRIVATE_XMPCOMMON_SOURCES}
${PRIVATE_XMPCORE_HEADERS}
${PUBLIC_XMPCOMMON_HEADERS}
+ ${PUBLIC_XMPCOMMON_SOURCES}
${PUBLIC_XMPCORE_HEADERS}
- ${XMPCOMMON_SOURCES}
+ ${PUBLIC_XMPCORE_SOURCES}
${RESOURCE_FILES}
)
-else()
- list (REMOVE_ITEM CORECLASS_SOURCE_FILES
- ${SOURCE_ROOT}/XMPArrayNode_v1_Impl.cpp
- ${SOURCE_ROOT}/XMPArrayNodeIterator_v1_Impl.cpp
- ${SOURCE_ROOT}/XMPCoreObjectFactory_Impl.cpp
- ${SOURCE_ROOT}/XMPMetadata_v1_Impl.cpp
- ${SOURCE_ROOT}/XMPNode_v1_Impl.cpp
- ${SOURCE_ROOT}/XMPPathSegment_v1_Impl.cpp
- ${SOURCE_ROOT}/XMPPath_v1_Impl.cpp
- ${SOURCE_ROOT}/XMPQName_v1_Impl.cpp
- ${SOURCE_ROOT}/XMPQualifiers_v1_Impl.cpp
- ${SOURCE_ROOT}/XMPSimpleNode_v1_Impl.cpp
- ${SOURCE_ROOT}/XMPStructNode_v1_Impl.cpp
- ${SOURCE_ROOT}/XMPStructNodeIterator_v1_Impl.cpp
- )
-
- list(APPEND SOURCE_FILES
- ${PUBLIC_CLIENTGLUE_HEADER_FILES}
- ${PUBLIC_HEADER_FILES}
- ${INTERNAL_HEADER_FILES}
- ${ABIWRAPPER_SOURCE_FILES}
- ${ABIWRAPPER_SOURCE_FILES}
- ${CORECLASS_SOURCE_FILES}
- ${THIRDPARTY_SOURCE_FILES}
- ${UTILITY_SOURCE_FILES}
- ${RESOURCE_FILES}
- )
-
endif()
+
# include directories
include_directories(${XMPROOT_DIR})
include_directories(${XMPROOT_DIR}/public/include)
include_directories(${XMPROOT_DIR}/third-party/expat/public/lib)
include_directories(${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT})
+if(UNIX AND NOT APPLE AND NOT ${XMP_BUILD_STATIC})
+include_directories(${XMPROOT_DIR}/XMPCore/third-party/uuid/include)
+endif()
+if (WIN32)
+ include_directories(${RESOURCE_ROOT}/win)
+else ()
+ include_directories(${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT})
+endif ()
+#additional link directory
+link_directories(${OUTPUT_DIR})
# ==============================================================================
@@ -151,26 +168,47 @@ if (UNIX AND APPLE AND NOT ${XMP_BUILD_STATIC})
else()
set (INFO_PLIST_FLAGS "-DNDEBUG=1")
endif()
-
- add_custom_target(${TARGET_NAME}InfoPlist
- COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- COMMAND if [ $(CONFIGURATION) != Debug ]; then
- ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.plist
- -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
- -DPRODUCT_NAME=${TARGET_NAME} -DMAC_ENV=1 -DNDEBUG=1
- -include ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}PList.h
- -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
- \; else
- ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.plist
- -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
- -DPRODUCT_NAME=${TARGET_NAME} -DMAC_ENV=1 -DDEBUG=1
- -include ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}PList.h
- -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
- \; fi
- COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
- COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
- COMMENT "Preprocessing Info-plist"
- )
+ if(NOT APPLE_IOS)
+ add_custom_target(${TARGET_NAME}InfoPlist
+ COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ COMMAND if [ $(CONFIGURATION) != Debug ]; then
+ ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.plist
+ -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
+ -DPRODUCT_NAME=${TARGET_NAME} -DMAC_ENV=1 -DNDEBUG=1
+ -include ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}PList.h
+ -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
+ \; else
+ ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.plist
+ -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
+ -DPRODUCT_NAME=${TARGET_NAME} -DMAC_ENV=1 -DDEBUG=1
+ -include ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}PList.h
+ -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
+ \; fi
+ COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
+ COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
+ COMMENT "Preprocessing Info-plist"
+ )
+ else()
+ add_custom_target(${TARGET_NAME}InfoPlist
+ COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ COMMAND if [ $(CONFIGURATION) != Debug ]; then
+ ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/ios/${TARGET_NAME}.plist
+ -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
+ -DPRODUCT_NAME=${TARGET_NAME} -DIOS_ENV=1 -DNDEBUG=1
+ -include ${RESOURCE_ROOT}/ios/${TARGET_NAME}PList.h
+ -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
+ \; else
+ ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/ios/${TARGET_NAME}.plist
+ -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
+ -DPRODUCT_NAME=${TARGET_NAME} -DIOS_ENV=1 -DDEBUG=1
+ -include ${RESOURCE_ROOT}/ios/${TARGET_NAME}PList.h
+ -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
+ \; fi
+ COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
+ COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
+ COMMENT "Preprocessing Info-plist"
+ )
+ endif()
set(DEPENDENCY_LIST "ALL:${TARGET_NAME}InfoPlist")
else ()
set(DEPENDENCY_LIST "")
@@ -183,7 +221,7 @@ set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${XMPCORE_LIB})
# ==============================================================================
# Link dependencies
-set(FRAMEWORK_LIST "Mac:CoreFoundation" "Mac:CoreServices")
+set(FRAMEWORK_LIST "ALL:CoreFoundation" "Mac:CoreServices")
AddMacFramework(${TARGET_NAME} FRAMEWORK_LIST)
@@ -193,6 +231,10 @@ else(WIN32)
if(UNIX AND NOT APPLE)
SetWinLinkFlags(${TARGET_NAME} "-Xlinker --version-script -Xlinker \"${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.exp\"" "")
else()
+ if(APPLE_IOS AND NOT XMP_BUILD_STATIC)
+ set_target_properties(${TARGET_NAME} PROPERTIES XCODE_ATTRIBUTE_DYLIB_INSTALL_NAME_BASE "@rpath")
+ set_target_properties(${TARGET_NAME} PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.adobe.Adobe${TARGET_NAME}")
+ endif()
set_target_properties(${TARGET_NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH ON INSTALL_NAME_DIR "@executable_path/../Frameworks")
SetWinLinkFlags(${TARGET_NAME} "-unexported_symbols_list \"${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/XMPCore.unexp\"" "${XMPCORE_LIB}")
set_target_properties(${TARGET_NAME} PROPERTIES XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "YES")