diff options
Diffstat (limited to 'samples/build/cmake')
18 files changed, 1437 insertions, 1340 deletions
diff --git a/samples/build/cmake/CMakeLists.txt b/samples/build/cmake/CMakeLists.txt index f9da24c..3361e55 100644 --- a/samples/build/cmake/CMakeLists.txt +++ b/samples/build/cmake/CMakeLists.txt @@ -1,25 +1,33 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-#This projects relative path to XMP Root
-set ( XMP_THIS_PROJECT_RELATIVEPATH "../../../")
-#setting the root for XMP SDK
-if(NOT DEFINED XMP_ROOT)
- set(XMP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH})
-endif()
-
-if(NOT DEFINED COMMON_BUILD_SHARED_DIR)
- set(COMMON_BUILD_SHARED_DIR ${XMP_ROOT}/build/shared)
-endif()
-
-set(USE_BUILDMODE_LIBNAME 0)
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +project(${PROJECT_NAME}64) + +#This projects relative path to XMP Root +set ( XMP_THIS_PROJECT_RELATIVEPATH "../../../") +#setting the root for XMP SDK +if(NOT DEFINED XMP_ROOT) + set(XMP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}) +endif() + +if(NOT DEFINED COMMON_BUILD_SHARED_DIR) + set(COMMON_BUILD_SHARED_DIR ${XMP_ROOT}/build/shared) +endif() + +set(USE_BUILDMODE_LIBNAME 0) + include(CMakeListsCommonSDK.txt)
\ No newline at end of file diff --git a/samples/build/cmake/CMakeListsCommonSDK.txt b/samples/build/cmake/CMakeListsCommonSDK.txt index f2e7436..73f1578 100644 --- a/samples/build/cmake/CMakeListsCommonSDK.txt +++ b/samples/build/cmake/CMakeListsCommonSDK.txt @@ -1,72 +1,77 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configurations" FORCE)
-#This projects relative path to XMP Root
-
-# Set the project name according to target
-if(CMAKE_CL_64)
- set(IS64BIT "TRUE")
- set (POSTFIX "_x64")
- project(XMP_Samples_64)
- message (INFO ":64 Target is chosen")
-else(CMAKE_CL_64)
- set(IS64BIT "FALSE")
- project(XMP_Samples)
- message (INFO ":32 bit target is chosen")
-endif(CMAKE_CL_64)
-
-set(TESTXMP_VERSION 1.0)
-
-# setting static flag for correct compiler flag through shared config
-if(STATIC)
-set (XMP_BUILD_STATIC 1)
-else(STATIC)
-set (XMP_BUILD_STATIC 0)
-endif(STATIC)
-
-# ==============================================================================
-# load shared config
-# ==============================================================================
-include(SharedConfigSDK.cmake)
-
-# common path defines
-# setup project specific paths
-set( PROJECT_ROOT ${PROJECT_SOURCE_DIR})
-set( SAMPLE_SOURCE_ROOT ${PROJECT_ROOT}/../../source/)
-set( XMP_ROOT ${PROJECT_ROOT}/../../.. )
-set( PUBLIC_INCLUDE ${XMP_ROOT}/public/include)
-
-# Output of test executables
-set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/target/${PLATFORM_FOLDER}/)
-
-# Add the Samples to the project
-# message (INFO ":Add CustomSchema sample")
- add_subdirectory(${PROJECT_ROOT}/CustomSchema ${PROJECT_ROOT}/CustomSchema/build${POSTFIX})
- add_subdirectory(${PROJECT_ROOT}/CustomSchemaNewDOM ${PROJECT_ROOT}/CustomSchemaNewDOM/build${POSTFIX})
- add_subdirectory(${PROJECT_ROOT}/DumpFile ${PROJECT_ROOT}/DumpFile/build${POSTFIX})
- add_subdirectory(${PROJECT_ROOT}/DumpMainXMP ${PROJECT_ROOT}/DumpMainXMP/build${POSTFIX})
- add_subdirectory(${PROJECT_ROOT}/DumpScannedXMP ${PROJECT_ROOT}/DumpScannedXMP/build${POSTFIX})
- add_subdirectory(${PROJECT_ROOT}/ModifyingXMP ${PROJECT_ROOT}/ModifyingXMP/build${POSTFIX})
- add_subdirectory(${PROJECT_ROOT}/ModifyingXMPNewDOM ${PROJECT_ROOT}/ModifyingXMPNewDOM/build${POSTFIX})
- add_subdirectory(${PROJECT_ROOT}/ReadingXMP ${PROJECT_ROOT}/ReadingXMP/build${POSTFIX})
- add_subdirectory(${PROJECT_ROOT}/ReadingXMPNewDOM ${PROJECT_ROOT}/ReadingXMPNewDOM/build${POSTFIX})
- add_subdirectory(${PROJECT_ROOT}/XMPCommand ${PROJECT_ROOT}/XMPCommand/build${POSTFIX})
- add_subdirectory(${PROJECT_ROOT}/XMPCoreCoverage ${PROJECT_ROOT}/XMPCoreCoverage/build${POSTFIX})
- add_subdirectory(${PROJECT_ROOT}/XMPFilesCoverage ${PROJECT_ROOT}/XMPFilesCoverage/build${POSTFIX})
- add_subdirectory(${PROJECT_ROOT}/XMPIterations ${PROJECT_ROOT}/XMPIterations/build${POSTFIX})
-
-message (STATUS "===========================================================================")
-message (STATUS " ${PROJECT_NAME} ")
-message (STATUS "===========================================================================")
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +SET(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configurations" FORCE) +#This projects relative path to XMP Root + +# Set the project name according to target +if(CMAKE_CL_64) + set(IS64BIT "TRUE") + set (POSTFIX "_x64") + project(XMP_Samples_64) + message (INFO ":64 Target is chosen") +else(CMAKE_CL_64) + set(IS64BIT "FALSE") + project(XMP_Samples) + message (INFO ":32 bit target is chosen") +endif(CMAKE_CL_64) + +set(TESTXMP_VERSION 1.0) + +# setting static flag for correct compiler flag through shared config +if(STATIC) +set (XMP_BUILD_STATIC 1) +else(STATIC) +set (XMP_BUILD_STATIC 0) +endif(STATIC) + +# ============================================================================== +# load shared config +# ============================================================================== +include(SharedConfigSDK.cmake) + +# common path defines +# setup project specific paths +set( PROJECT_ROOT ${PROJECT_SOURCE_DIR}) +set( SAMPLE_SOURCE_ROOT ${PROJECT_ROOT}/../../source/) +set( XMP_ROOT ${PROJECT_ROOT}/../../.. ) +set( PUBLIC_INCLUDE ${XMP_ROOT}/public/include) + +# Output of test executables +set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/target/${PLATFORM_FOLDER}/) + +# Add the Samples to the project +# message (INFO ":Add CustomSchema sample") + add_subdirectory(${PROJECT_ROOT}/CustomSchema ${PROJECT_ROOT}/CustomSchema/build${POSTFIX}) + add_subdirectory(${PROJECT_ROOT}/CustomSchemaNewDOM ${PROJECT_ROOT}/CustomSchemaNewDOM/build${POSTFIX}) + add_subdirectory(${PROJECT_ROOT}/DumpFile ${PROJECT_ROOT}/DumpFile/build${POSTFIX}) + add_subdirectory(${PROJECT_ROOT}/DumpMainXMP ${PROJECT_ROOT}/DumpMainXMP/build${POSTFIX}) + add_subdirectory(${PROJECT_ROOT}/DumpScannedXMP ${PROJECT_ROOT}/DumpScannedXMP/build${POSTFIX}) + add_subdirectory(${PROJECT_ROOT}/ModifyingXMP ${PROJECT_ROOT}/ModifyingXMP/build${POSTFIX}) + add_subdirectory(${PROJECT_ROOT}/ModifyingXMPNewDOM ${PROJECT_ROOT}/ModifyingXMPNewDOM/build${POSTFIX}) + add_subdirectory(${PROJECT_ROOT}/ReadingXMP ${PROJECT_ROOT}/ReadingXMP/build${POSTFIX}) + add_subdirectory(${PROJECT_ROOT}/ReadingXMPNewDOM ${PROJECT_ROOT}/ReadingXMPNewDOM/build${POSTFIX}) + add_subdirectory(${PROJECT_ROOT}/XMPCommand ${PROJECT_ROOT}/XMPCommand/build${POSTFIX}) + add_subdirectory(${PROJECT_ROOT}/XMPCoreCoverage ${PROJECT_ROOT}/XMPCoreCoverage/build${POSTFIX}) + add_subdirectory(${PROJECT_ROOT}/XMPFilesCoverage ${PROJECT_ROOT}/XMPFilesCoverage/build${POSTFIX}) + add_subdirectory(${PROJECT_ROOT}/XMPIterations ${PROJECT_ROOT}/XMPIterations/build${POSTFIX}) + +message (STATUS "===========================================================================") +message (STATUS " ${PROJECT_NAME} ") +message (STATUS "===========================================================================") + + diff --git a/samples/build/cmake/CustomSchema/CMakeLists.txt b/samples/build/cmake/CustomSchema/CMakeLists.txt index 363efc6..faaf454 100644 --- a/samples/build/cmake/CustomSchema/CMakeLists.txt +++ b/samples/build/cmake/CustomSchema/CMakeLists.txt @@ -1,82 +1,87 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Adding Project Name
-# ==============================================================================
-project (CustomSchema)
-
-# ==============================================================================
-if(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=1)
-else(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=0)
-endif(STATIC)
-
-file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/CustomSchema.cpp )
-source_group("Source Files" FILES ${SOURCE_FILES})
-include_directories( ${XMP_ROOT} )
-include_directories( ${PUBLIC_INCLUDE} )
-add_executable(${PROJECT_NAME} ${SOURCE_FILES})
-
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#addding XMP libs and setting output path
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB})
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT})
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-
-#message (STATUS "Output Folder -> ${OUTPUT_DIR}")
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Adding Project Name +# ============================================================================== +project (CustomSchema) + +# ============================================================================== +if(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=1) +else(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=0) +endif(STATIC) + +file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/CustomSchema.cpp ) +source_group("Source Files" FILES ${SOURCE_FILES}) +include_directories( ${XMP_ROOT} ) +include_directories( ${PUBLIC_INCLUDE} ) +add_executable(${PROJECT_NAME} ${SOURCE_FILES}) + +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#addding XMP libs and setting output path +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB}) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) + +#message (STATUS "Output Folder -> ${OUTPUT_DIR}") +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + diff --git a/samples/build/cmake/CustomSchemaNewDOM/CMakeLists.txt b/samples/build/cmake/CustomSchemaNewDOM/CMakeLists.txt index e1799e8..508bab7 100644 --- a/samples/build/cmake/CustomSchemaNewDOM/CMakeLists.txt +++ b/samples/build/cmake/CustomSchemaNewDOM/CMakeLists.txt @@ -1,89 +1,94 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Adding Project Name
-# ==============================================================================
-project (CustomSchemaNewDOM)
-
-# ==============================================================================
-add_definitions(-DENABLE_CPP_DOM_MODEL=1)
-if(STATIC)
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/CustomSchemaNewDOM.cpp )
- source_group("Source Files" FILES ${SOURCE_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES})
-else(STATIC)
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/CustomSchemaNewDOM.cpp )
- file (GLOB CORE_PUBLIC_SOURCE_FILES ${XMP_ROOT}/public/include/XMPCore/source/*.cpp)
- file (GLOB COMMON_PUBLIC_SOURCE_FILES ${XMP_ROOT}/public/include/XMPCommon/source/*.cpp)
- source_group("Source Files" FILES ${SOURCE_FILES})
- source_group("Source Files\\Public\\XMPCore" FILES ${CORE_PUBLIC_SOURCE_FILES})
- source_group("Source Files\\Public\\XMPCommon" FILES ${COMMON_PUBLIC_SOURCE_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${CORE_PUBLIC_SOURCE_FILES} ${COMMON_PUBLIC_SOURCE_FILES})
-endif(STATIC)
-
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#addding XMP libs and setting output path
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/)
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT})
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB})
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-
-#message (STATUS "Output Folder -> ${OUTPUT_DIR}")
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Adding Project Name +# ============================================================================== +project (CustomSchemaNewDOM) + +# ============================================================================== +add_definitions(-DENABLE_CPP_DOM_MODEL=1) +if(STATIC) + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/CustomSchemaNewDOM.cpp ) + source_group("Source Files" FILES ${SOURCE_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES}) +else(STATIC) + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/CustomSchemaNewDOM.cpp ) + file (GLOB CORE_PUBLIC_SOURCE_FILES ${XMP_ROOT}/public/include/XMPCore/source/*.cpp) + file (GLOB COMMON_PUBLIC_SOURCE_FILES ${XMP_ROOT}/public/include/XMPCommon/source/*.cpp) + source_group("Source Files" FILES ${SOURCE_FILES}) + source_group("Source Files\\Public\\XMPCore" FILES ${CORE_PUBLIC_SOURCE_FILES}) + source_group("Source Files\\Public\\XMPCommon" FILES ${COMMON_PUBLIC_SOURCE_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${CORE_PUBLIC_SOURCE_FILES} ${COMMON_PUBLIC_SOURCE_FILES}) +endif(STATIC) + +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#addding XMP libs and setting output path +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB}) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) + +#message (STATUS "Output Folder -> ${OUTPUT_DIR}") +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + diff --git a/samples/build/cmake/DumpFile/CMakeLists.txt b/samples/build/cmake/DumpFile/CMakeLists.txt index 2253c05..f412eec 100644 --- a/samples/build/cmake/DumpFile/CMakeLists.txt +++ b/samples/build/cmake/DumpFile/CMakeLists.txt @@ -8,7 +8,12 @@ # ================================================================================================= # define minimum cmake version -cmake_minimum_required(VERSION 3.5.2) +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) # ============================================================================== # Adding Project Name diff --git a/samples/build/cmake/DumpFile/CMakeListsCommon.txt b/samples/build/cmake/DumpFile/CMakeListsCommon.txt index a969f27..a06d804 100644 --- a/samples/build/cmake/DumpFile/CMakeListsCommon.txt +++ b/samples/build/cmake/DumpFile/CMakeListsCommon.txt @@ -1,70 +1,75 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-
-source_group("Source Files" FILES ${SOURCE_FILES})
-source_group("Common Files" FILES ${COMMON_FILES})
-include_directories( ${XMP_ROOT} )
-include_directories( ${PUBLIC_INCLUDE} )
-
-add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${COMMON_FILES})
-
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#addding XMP libs and setting output path
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + + +source_group("Source Files" FILES ${SOURCE_FILES}) +source_group("Common Files" FILES ${COMMON_FILES}) +include_directories( ${XMP_ROOT} ) +include_directories( ${PUBLIC_INCLUDE} ) + +add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${COMMON_FILES}) + +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#addding XMP libs and setting output path +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) + +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + diff --git a/samples/build/cmake/DumpMainXMP/CMakeLists.txt b/samples/build/cmake/DumpMainXMP/CMakeLists.txt index a6f266f..9984172 100644 --- a/samples/build/cmake/DumpMainXMP/CMakeLists.txt +++ b/samples/build/cmake/DumpMainXMP/CMakeLists.txt @@ -1,80 +1,85 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Adding Project Name
-# ==============================================================================
-project ( DumpMainXMP )
-
-# ==============================================================================
-if(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=1)
-else(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=0)
-endif(STATIC)
-
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/DumpMainXMP.cpp )
- source_group("Source Files" FILES ${SOURCE_FILES})
- source_group("Common Files" FILES ${COMMON_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES})
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#addding XMP libs and setting output path
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Adding Project Name +# ============================================================================== +project ( DumpMainXMP ) + +# ============================================================================== +if(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=1) +else(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=0) +endif(STATIC) + + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/DumpMainXMP.cpp ) + source_group("Source Files" FILES ${SOURCE_FILES}) + source_group("Common Files" FILES ${COMMON_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES}) +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#addding XMP libs and setting output path +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + + diff --git a/samples/build/cmake/DumpScannedXMP/CMakeLists.txt b/samples/build/cmake/DumpScannedXMP/CMakeLists.txt index 97f5169..6970c9a 100644 --- a/samples/build/cmake/DumpScannedXMP/CMakeLists.txt +++ b/samples/build/cmake/DumpScannedXMP/CMakeLists.txt @@ -1,82 +1,87 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Adding Project Name
-# ==============================================================================
-project (DumpScannedXMP)
-
-# ==============================================================================
-if(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=1)
-else(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=0)
-endif(STATIC)
-
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/DumpScannedXMP.cpp)
- source_group("Source Files" FILES ${SOURCE_FILES})
- source_group("Common Files" FILES ${COMMON_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES} )
-
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#addding XMP libs and setting output path
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Adding Project Name +# ============================================================================== +project (DumpScannedXMP) + +# ============================================================================== +if(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=1) +else(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=0) +endif(STATIC) + + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/DumpScannedXMP.cpp) + source_group("Source Files" FILES ${SOURCE_FILES}) + source_group("Common Files" FILES ${COMMON_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES} ) + +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#addding XMP libs and setting output path +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + + diff --git a/samples/build/cmake/ModifyingXMP/CMakeLists.txt b/samples/build/cmake/ModifyingXMP/CMakeLists.txt index 538d38b..bd163bb 100644 --- a/samples/build/cmake/ModifyingXMP/CMakeLists.txt +++ b/samples/build/cmake/ModifyingXMP/CMakeLists.txt @@ -1,83 +1,88 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Adding Project Name
-# ==============================================================================
-project (ModifyingXMP)
-
-# ==============================================================================
-
-if(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=1)
-else(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=0)
-endif(STATIC)
-
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/ModifyingXMP.cpp)
- source_group("Source Files" FILES ${SOURCE_FILES})
- source_group("Common Files" FILES ${COMMON_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES} )
-
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#addding XMP libs and setting output path
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Adding Project Name +# ============================================================================== +project (ModifyingXMP) + +# ============================================================================== + +if(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=1) +else(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=0) +endif(STATIC) + + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/ModifyingXMP.cpp) + source_group("Source Files" FILES ${SOURCE_FILES}) + source_group("Common Files" FILES ${COMMON_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES} ) + +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#addding XMP libs and setting output path +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) + +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + + diff --git a/samples/build/cmake/ModifyingXMPNewDOM/CMakeLists.txt b/samples/build/cmake/ModifyingXMPNewDOM/CMakeLists.txt index 20ee052..cb50a41 100644 --- a/samples/build/cmake/ModifyingXMPNewDOM/CMakeLists.txt +++ b/samples/build/cmake/ModifyingXMPNewDOM/CMakeLists.txt @@ -1,89 +1,94 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Adding Project Name
-# ==============================================================================
-project (ModifyingXMPNewDOM)
-
-# ==============================================================================
-add_definitions(-DENABLE_CPP_DOM_MODEL=1)
-if(STATIC)
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/ModifyingXMPNewDOM.cpp)
- source_group("Source Files" FILES ${SOURCE_FILES})
- source_group("Common Files" FILES ${COMMON_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES} )
-else(STATIC)
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/ModifyingXMPNewDOM.cpp)
- file (GLOB CORE_PUBLIC_SOURCE_FILES ${XMP_ROOT}/public/include/XMPCore/source/*.cpp)
- file (GLOB COMMON_PUBLIC_SOURCE_FILES ${XMP_ROOT}/public/include/XMPCommon/source/*.cpp)
- source_group("Source Files" FILES ${SOURCE_FILES})
- source_group("Source Files\\Public\\XMPCore" FILES ${CORE_PUBLIC_SOURCE_FILES})
- source_group("Source Files\\Public\\XMPCommon" FILES ${COMMON_PUBLIC_SOURCE_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${CORE_PUBLIC_SOURCE_FILES} ${COMMON_PUBLIC_SOURCE_FILES})
-endif(STATIC)
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#addding XMP libs and setting output path
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-
-
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Adding Project Name +# ============================================================================== +project (ModifyingXMPNewDOM) + +# ============================================================================== +add_definitions(-DENABLE_CPP_DOM_MODEL=1) +if(STATIC) + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/ModifyingXMPNewDOM.cpp) + source_group("Source Files" FILES ${SOURCE_FILES}) + source_group("Common Files" FILES ${COMMON_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES} ) +else(STATIC) + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/ModifyingXMPNewDOM.cpp) + file (GLOB CORE_PUBLIC_SOURCE_FILES ${XMP_ROOT}/public/include/XMPCore/source/*.cpp) + file (GLOB COMMON_PUBLIC_SOURCE_FILES ${XMP_ROOT}/public/include/XMPCommon/source/*.cpp) + source_group("Source Files" FILES ${SOURCE_FILES}) + source_group("Source Files\\Public\\XMPCore" FILES ${CORE_PUBLIC_SOURCE_FILES}) + source_group("Source Files\\Public\\XMPCommon" FILES ${COMMON_PUBLIC_SOURCE_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${CORE_PUBLIC_SOURCE_FILES} ${COMMON_PUBLIC_SOURCE_FILES}) +endif(STATIC) +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#addding XMP libs and setting output path +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) + + +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + + diff --git a/samples/build/cmake/ReadingXMP/CMakeLists.txt b/samples/build/cmake/ReadingXMP/CMakeLists.txt index 6a96277..e042d81 100644 --- a/samples/build/cmake/ReadingXMP/CMakeLists.txt +++ b/samples/build/cmake/ReadingXMP/CMakeLists.txt @@ -1,83 +1,88 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Adding Project Name
-# ==============================================================================
-project (ReadingXMP)
-
-# ==============================================================================
-if(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=1)
-else(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=0)
-endif(STATIC)
-
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/ReadingXMP.cpp)
- source_group("Source Files" FILES ${SOURCE_FILES})
- source_group("Common Files" FILES ${COMMON_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES} )
-
-
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#addding XMP libs and setting output path
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Adding Project Name +# ============================================================================== +project (ReadingXMP) + +# ============================================================================== +if(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=1) +else(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=0) +endif(STATIC) + + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/ReadingXMP.cpp) + source_group("Source Files" FILES ${SOURCE_FILES}) + source_group("Common Files" FILES ${COMMON_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES} ) + + +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#addding XMP libs and setting output path +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) + +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + + diff --git a/samples/build/cmake/ReadingXMPNewDOM/CMakeLists.txt b/samples/build/cmake/ReadingXMPNewDOM/CMakeLists.txt index 51682cc..2599385 100644 --- a/samples/build/cmake/ReadingXMPNewDOM/CMakeLists.txt +++ b/samples/build/cmake/ReadingXMPNewDOM/CMakeLists.txt @@ -1,90 +1,95 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Adding Project Name
-# ==============================================================================
-project (ReadingXMPNewDOM)
-
-# ==============================================================================
-
-add_definitions(-DENABLE_CPP_DOM_MODEL=1)
-if(STATIC)
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/ReadingXMPNewDOM.cpp)
- source_group("Source Files" FILES ${SOURCE_FILES})
- source_group("Common Files" FILES ${COMMON_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES} )
-else(STATIC)
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/ReadingXMPNewDOM.cpp)
- file (GLOB CORE_PUBLIC_SOURCE_FILES ${XMP_ROOT}/public/include/XMPCore/source/*.cpp)
- file (GLOB COMMON_PUBLIC_SOURCE_FILES ${XMP_ROOT}/public/include/XMPCommon/source/*.cpp)
- source_group("Source Files" FILES ${SOURCE_FILES})
- source_group("Common Files" FILES ${COMMON_FILES})
- source_group("Source Files\\Public\\XMPCore" FILES ${CORE_PUBLIC_SOURCE_FILES})
- source_group("Source Files\\Public\\XMPCommon" FILES ${COMMON_PUBLIC_SOURCE_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${CORE_PUBLIC_SOURCE_FILES} ${COMMON_PUBLIC_SOURCE_FILES})
-endif(STATIC)
-
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#adding XMP libs and setting output path
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT})
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Adding Project Name +# ============================================================================== +project (ReadingXMPNewDOM) + +# ============================================================================== + +add_definitions(-DENABLE_CPP_DOM_MODEL=1) +if(STATIC) + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/ReadingXMPNewDOM.cpp) + source_group("Source Files" FILES ${SOURCE_FILES}) + source_group("Common Files" FILES ${COMMON_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES} ) +else(STATIC) + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/ReadingXMPNewDOM.cpp) + file (GLOB CORE_PUBLIC_SOURCE_FILES ${XMP_ROOT}/public/include/XMPCore/source/*.cpp) + file (GLOB COMMON_PUBLIC_SOURCE_FILES ${XMP_ROOT}/public/include/XMPCommon/source/*.cpp) + source_group("Source Files" FILES ${SOURCE_FILES}) + source_group("Common Files" FILES ${COMMON_FILES}) + source_group("Source Files\\Public\\XMPCore" FILES ${CORE_PUBLIC_SOURCE_FILES}) + source_group("Source Files\\Public\\XMPCommon" FILES ${COMMON_PUBLIC_SOURCE_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${CORE_PUBLIC_SOURCE_FILES} ${COMMON_PUBLIC_SOURCE_FILES}) +endif(STATIC) + +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#adding XMP libs and setting output path +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + + diff --git a/samples/build/cmake/SharedConfigSDK.cmake b/samples/build/cmake/SharedConfigSDK.cmake index 14a3fb9..bf968b7 100644 --- a/samples/build/cmake/SharedConfigSDK.cmake +++ b/samples/build/cmake/SharedConfigSDK.cmake @@ -1,178 +1,187 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# ==============================================================================
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Shared config for XMP Samples
-# ==============================================================================
-
-
-# Platform specific config
-if(UNIX)
- if(APPLE)
- # OSX -------------------------------------------
- if(STATIC)
- set(BUILD_FOLDER "xcode")
- set(XMPCORE_LIB "XMPCore")
- set(XMPFILES_LIB "XMPFiles")
- set(LIB_EXT ".a")
- else(STATIC)
- set(BUILD_FOLDER "xcode")
- set(XMPCORE_LIB "XMPCore")
- set(XMPFILES_LIB "XMPFiles")
- set(LIB_EXT ".framework")
- endif(STATIC)
- add_definitions(-DMAC_ENV=1)
- if(CMAKE_CL_64)
- set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX" FORCE)
- set(PLATFORM_FOLDER "macintosh/intel_64")
- add_definitions(-DXMP_64=1)
- else(CMAKE_CL_64)
- set(CMAKE_OSX_ARCHITECTURES "i386" CACHE STRING "Build architectures for OSX" FORCE)
- set(PLATFORM_FOLDER "macintosh/intel")
- endif(CMAKE_CL_64)
- # set specific SDK and compiler version
- if (NOT DEFINED OSX_DEVELOPER_ROOT)
- set(OSX_DEVELOPER_ROOT "/Applications/Xcode.app/Contents/Developer")
- endif()
- #check is the path to OSX_DEVELOPER_ROOT exists
- if(IS_DIRECTORY ${OSX_DEVELOPER_ROOT})
- set(CMAKE_OSX_SYSROOT "${OSX_DEVELOPER_ROOT}" )
- else()
- message ( FATAL_ERROR "ERROR: The sdk dir set is ${OSX_DEVELOPER_ROOT}, but it does not exist. See readme.txt for resolution")
- endif()
- message ( STATUS "OSX SDK is set to ${CMAKE_OSX_SYSROOT}")
- set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9")
- set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
-
- # set Warning flags
- set(CMAKE_CXX_FLAGS "-Wno-trigraphs -Wnon-virtual-dtor -Woverloaded-virtual -Wmissing-braces -Wparentheses -Wswitch -Wunused-value -Wunknown-pragmas -Wsign-compare -Wreturn-type")
- # set Compiler build flags
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fshort-enums -funsigned-char -mone-byte-bool -fno-common -ffast-math")
- # set config specific flagss
- set(CMAKE_CXX_FLAGS_DEBUG "-O0 -DDEBUG=1 -D_DEBUG=1")
- set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG=1")
-
- set(CMAKE_C_FLAGS "")
- else(APPLE)
- # Linux -------------------------------------------
- if(STATIC)
- set(BUILD_FOLDER "gcc4")
- set(XMPCORE_LIB "staticXMPCore")
- set(XMPFILES_LIB "staticXMPFiles")
- set(LIB_EXT ".ar")
- else(STATIC)
- set(BUILD_FOLDER "gcc4")
- set(XMPCORE_LIB "libXMPCore")
- set(XMPFILES_LIB "libXMPFiles")
- set(LIB_EXT ".so")
- endif(STATIC)
- add_definitions(-DUNIX_ENV=1 -D__LITTLE_ENDIAN__=1)
-
- if(CMAKE_CL_64)
- add_definitions(-DXMP_64=1)
- set(PLATFORM_FOLDER "i80386linux_x64")
- else()
- set(PLATFORM_FOLDER "i80386linux")
- endif(CMAKE_CL_64)
-
- set(CMAKE_CXX_FLAGS "${CXX_FLAGS} -Wno-ctor-dtor-privacy -fPIC -funsigned-char -fexceptions -Wno-multichar -Wno-implicit")
- set(CMAKE_CXX_FLAGS_DEBUG "-O0 -DDEBUG=1 -D_DEBUG=1")
- set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG=1")
- endif(APPLE)
-else(UNIX)
- if(WIN32)
-
- # Windows -------------------------------------------
- if(STATIC)
- set(BUILD_FOLDER "vc14")
- set(XMPCORE_LIB "XMPCore")
- set(XMPFILES_LIB "XMPFiles")
- set(LIB_EXT ".lib")
- else(STATIC)
- set(BUILD_FOLDER "vc14")
- set(XMPCORE_LIB "XMPCore")
- set(XMPFILES_LIB "XMPFiles")
- set(LIB_EXT ".lib")
- endif(STATIC)
-
- if(CMAKE_CL_64)
- add_definitions(-DXMP_64=1)
- set(PLATFORM_FOLDER "windows_x64")
- else(CMAKE_CL_64)
- set(PLATFORM_FOLDER "windows")
- endif(CMAKE_CL_64)
-
- # config independend preprocessor defines
- add_definitions(-DWIN_ENV=1 -DWIN32=1 -D_CONSOLE -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS=1 -D_SCL_SECURE_NO_WARNINGS=1 )
-
- if(STATIC)
- add_definitions(-DXMP_StaticBuild=1)
- else(STATIC)
- add_definitions(-DXMP_StaticBuild=0)
- endif(STATIC)
-
- else(WIN32)
- # unknown platform
- MESSAGE(ERROR ": Unknown Platform")
- endif(WIN32)
-endif(UNIX)
-
-include(${XMP_ROOT}/build/ProductConfig.cmake)
-#including the shared configs
-set (COMPONENT XMP)
-include(${COMMON_BUILD_SHARED_DIR}/SharedConfig.cmake)
-
-
-# ==============================================================================
-# Platform independend config
-# ==============================================================================
-
-# generic preprocessor defines
-# add_definitions(-DXMP_StaticBuild=1)
- if(STATIC)
- add_definitions(-DXMP_StaticBuild=1)
- else(STATIC)
- add_definitions(-DXMP_StaticBuild=0)
- endif(STATIC)
-
-# Where to look for the XMPCore static library
-set(XMP_LIB_DIR ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER})
-#message (STATUS " XMP_LIB_DIR = ${XMP_LIB_DIR}")
-
-# We only need Debug and Release Targets
-if(CMAKE_CONFIGURATION_TYPES)
- set(CMAKE_CONFIGURATION_TYPES Debug Release)
- set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
- "Reset the configurations to what we need"
- FORCE)
-endif()
-
-# helper macro for Mac to add frameworks to the build
-macro(ADD_FRAMEWORK fwname appname)
- if(APPLE)
- find_library(FRAMEWORK_${fwname}
- NAMES ${fwname}
- PATHS ${CMAKE_OSX_SYSROOT}/System/Library
- PATH_SUFFIXES Frameworks
- NO_DEFAULT_PATH)
- if( ${FRAMEWORK_${fwname}} STREQUAL FRAMEWORK_${fwname}-NOTFOUND)
- MESSAGE(ERROR ": Framework ${fwname} not found")
- else()
- TARGET_LINK_LIBRARIES(${appname} ${FRAMEWORK_${fwname}})
- #MESSAGE(STATUS "Framework ${fwname} found at ${FRAMEWORK_${fwname}}")
- endif()
- set_target_properties(${appname} PROPERTIES XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS "YES")
- endif(APPLE)
-endmacro(ADD_FRAMEWORK)
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# ============================================================================== +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Shared config for XMP Samples +# ============================================================================== + + +# Platform specific config +if(UNIX) + if(APPLE) + # OSX ------------------------------------------- + if(STATIC) + set(BUILD_FOLDER "xcode") + set(XMPCORE_LIB "XMPCore") + set(XMPFILES_LIB "XMPFiles") + set(LIB_EXT ".a") + else(STATIC) + set(BUILD_FOLDER "xcode") + set(XMPCORE_LIB "XMPCore") + set(XMPFILES_LIB "XMPFiles") + set(LIB_EXT ".framework") + endif(STATIC) + add_definitions(-DMAC_ENV=1) + if(CMAKE_CL_64) + set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX" FORCE) + if(CMAKE_LIBCPP) + set(PLATFORM_FOLDER "macintosh/intel_64_libcpp") + else() + set(PLATFORM_FOLDER "macintosh/intel_64") + endif() + add_definitions(-DXMP_64=1) + else(CMAKE_CL_64) + set(CMAKE_OSX_ARCHITECTURES "i386" CACHE STRING "Build architectures for OSX" FORCE) + set(PLATFORM_FOLDER "macintosh/intel") + endif(CMAKE_CL_64) + # set specific SDK and compiler version + if (NOT DEFINED OSX_DEVELOPER_ROOT) + set(OSX_DEVELOPER_ROOT "/Applications/Xcode.app/Contents/Developer") + endif() + #check is the path to OSX_DEVELOPER_ROOT exists + if(IS_DIRECTORY ${OSX_DEVELOPER_ROOT}) + set(CMAKE_OSX_SYSROOT "${OSX_DEVELOPER_ROOT}" ) + else() + message ( FATAL_ERROR "ERROR: The sdk dir set is ${OSX_DEVELOPER_ROOT}, but it does not exist. See readme.txt for resolution") + endif() + message ( STATUS "OSX SDK is set to ${CMAKE_OSX_SYSROOT}") + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9") + set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0") + + # set Warning flags + set(CMAKE_CXX_FLAGS "-Wno-trigraphs -Wnon-virtual-dtor -Woverloaded-virtual -Wmissing-braces -Wparentheses -Wswitch -Wunused-value -Wunknown-pragmas -Wsign-compare -Wreturn-type") + # set Compiler build flags + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fshort-enums -funsigned-char -mone-byte-bool -fno-common -ffast-math") + # set config specific flagss + set(CMAKE_CXX_FLAGS_DEBUG "-O0 -DDEBUG=1 -D_DEBUG=1") + set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG=1") + + set(CMAKE_C_FLAGS "") + else(APPLE) + # Linux ------------------------------------------- + if(STATIC) + set(BUILD_FOLDER "gcc4") + set(XMPCORE_LIB "staticXMPCore") + set(XMPFILES_LIB "staticXMPFiles") + set(LIB_EXT ".ar") + else(STATIC) + set(BUILD_FOLDER "gcc4") + set(XMPCORE_LIB "libXMPCore") + set(XMPFILES_LIB "libXMPFiles") + set(LIB_EXT ".so") + endif(STATIC) + add_definitions(-DUNIX_ENV=1 -D__LITTLE_ENDIAN__=1) + + if(CMAKE_CL_64) + add_definitions(-DXMP_64=1) + set(PLATFORM_FOLDER "i80386linux_x64") + else() + set(PLATFORM_FOLDER "i80386linux") + endif(CMAKE_CL_64) + + set(CMAKE_CXX_FLAGS "${CXX_FLAGS} -Wno-ctor-dtor-privacy -fPIC -funsigned-char -fexceptions -Wno-multichar -Wno-implicit") + set(CMAKE_CXX_FLAGS_DEBUG "-O0 -DDEBUG=1 -D_DEBUG=1") + set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG=1") + endif(APPLE) +else(UNIX) + if(WIN32) + + # Windows ------------------------------------------- + if(STATIC) + set(BUILD_FOLDER "vc15") + set(XMPCORE_LIB "XMPCore") + set(XMPFILES_LIB "XMPFiles") + set(LIB_EXT ".lib") + else(STATIC) + set(BUILD_FOLDER "vc15") + set(XMPCORE_LIB "XMPCore") + set(XMPFILES_LIB "XMPFiles") + set(LIB_EXT ".lib") + endif(STATIC) + + if(CMAKE_CL_64) + add_definitions(-DXMP_64=1) + set(PLATFORM_FOLDER "windows_x64") + else(CMAKE_CL_64) + set(PLATFORM_FOLDER "windows") + endif(CMAKE_CL_64) + + # config independend preprocessor defines + add_definitions(-DWIN_ENV=1 -DWIN32=1 -D_CONSOLE -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS=1 -D_SCL_SECURE_NO_WARNINGS=1 ) + + if(STATIC) + add_definitions(-DXMP_StaticBuild=1) + else(STATIC) + add_definitions(-DXMP_StaticBuild=0) + endif(STATIC) + + else(WIN32) + # unknown platform + MESSAGE(ERROR ": Unknown Platform") + endif(WIN32) +endif(UNIX) + +include(${XMP_ROOT}/build/ProductConfig.cmake) +#including the shared configs +set (COMPONENT XMP) +include(${COMMON_BUILD_SHARED_DIR}/SharedConfig.cmake) + + +# ============================================================================== +# Platform independend config +# ============================================================================== + +# generic preprocessor defines +# add_definitions(-DXMP_StaticBuild=1) + if(STATIC) + add_definitions(-DXMP_StaticBuild=1) + else(STATIC) + add_definitions(-DXMP_StaticBuild=0) + endif(STATIC) + +# Where to look for the XMPCore static library +set(XMP_LIB_DIR ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}) +#message (STATUS " XMP_LIB_DIR = ${XMP_LIB_DIR}") + +# We only need Debug and Release Targets +if(CMAKE_CONFIGURATION_TYPES) + set(CMAKE_CONFIGURATION_TYPES Debug Release) + set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING + "Reset the configurations to what we need" + FORCE) +endif() + +# helper macro for Mac to add frameworks to the build +macro(ADD_FRAMEWORK fwname appname) + if(APPLE) + find_library(FRAMEWORK_${fwname} + NAMES ${fwname} + PATHS ${CMAKE_OSX_SYSROOT}/System/Library + PATH_SUFFIXES Frameworks + NO_DEFAULT_PATH) + if( ${FRAMEWORK_${fwname}} STREQUAL FRAMEWORK_${fwname}-NOTFOUND) + MESSAGE(ERROR ": Framework ${fwname} not found") + else() + TARGET_LINK_LIBRARIES(${appname} ${FRAMEWORK_${fwname}}) + #MESSAGE(STATUS "Framework ${fwname} found at ${FRAMEWORK_${fwname}}") + endif() + set_target_properties(${appname} PROPERTIES XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS "YES") + endif(APPLE) +endmacro(ADD_FRAMEWORK) + + diff --git a/samples/build/cmake/XMPCommand/CMakeLists.txt b/samples/build/cmake/XMPCommand/CMakeLists.txt index 4ba0d12..b869d6d 100644 --- a/samples/build/cmake/XMPCommand/CMakeLists.txt +++ b/samples/build/cmake/XMPCommand/CMakeLists.txt @@ -8,7 +8,12 @@ # ================================================================================================= # define minimum cmake version -cmake_minimum_required(VERSION 3.5.2) +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) # ============================================================================== diff --git a/samples/build/cmake/XMPCommand/CMakeListsCommon.txt b/samples/build/cmake/XMPCommand/CMakeListsCommon.txt index 105e098..22cc1f1 100644 --- a/samples/build/cmake/XMPCommand/CMakeListsCommon.txt +++ b/samples/build/cmake/XMPCommand/CMakeListsCommon.txt @@ -1,75 +1,80 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Adding Project Name
-# ==============================================================================
-project (XMPCommand)
-
-
-source_group("Source Files" FILES ${SOURCE_FILES})
-source_group("Common Files" FILES ${COMMON_FILES})
-include_directories( ${XMP_ROOT} )
-include_directories( ${PUBLIC_INCLUDE} )
-
-add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${COMMON_FILES})
-
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#addding XMP libs and setting output path
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB})
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Adding Project Name +# ============================================================================== +project (XMPCommand) + + +source_group("Source Files" FILES ${SOURCE_FILES}) +source_group("Common Files" FILES ${COMMON_FILES}) +include_directories( ${XMP_ROOT} ) +include_directories( ${PUBLIC_INCLUDE} ) + +add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${COMMON_FILES}) + +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#addding XMP libs and setting output path +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB}) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + + diff --git a/samples/build/cmake/XMPCoreCoverage/CMakeLists.txt b/samples/build/cmake/XMPCoreCoverage/CMakeLists.txt index 71b1773..7e51548 100644 --- a/samples/build/cmake/XMPCoreCoverage/CMakeLists.txt +++ b/samples/build/cmake/XMPCoreCoverage/CMakeLists.txt @@ -1,80 +1,85 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Adding Project Name
-# ==============================================================================
-project (XMPCoreCoverage)
-
-# ==============================================================================
-if(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=1)
-else(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=0)
-endif(STATIC)
-
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/XMPCoreCoverage.cpp)
- source_group("Source Files" FILES ${SOURCE_FILES})
- source_group("Common Files" FILES ${COMMON_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES} )
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#addding XMP libs and setting output path
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB})
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Adding Project Name +# ============================================================================== +project (XMPCoreCoverage) + +# ============================================================================== +if(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=1) +else(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=0) +endif(STATIC) + + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/XMPCoreCoverage.cpp) + source_group("Source Files" FILES ${SOURCE_FILES}) + source_group("Common Files" FILES ${COMMON_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES} ) +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#addding XMP libs and setting output path +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB}) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + + diff --git a/samples/build/cmake/XMPFilesCoverage/CMakeLists.txt b/samples/build/cmake/XMPFilesCoverage/CMakeLists.txt index 619d7fd..58c015a 100644 --- a/samples/build/cmake/XMPFilesCoverage/CMakeLists.txt +++ b/samples/build/cmake/XMPFilesCoverage/CMakeLists.txt @@ -1,80 +1,85 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Adding Project Name
-# ==============================================================================
-project (XMPFilesCoverage)
-
-# ==============================================================================
-if(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=1)
-else(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=0)
-endif(STATIC)
-
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/XMPFilesCoverage.cpp)
- source_group("Source Files" FILES ${SOURCE_FILES})
- source_group("Common Files" FILES ${COMMON_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES} )
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#addding XMP libs and setting output path
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB})
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Adding Project Name +# ============================================================================== +project (XMPFilesCoverage) + +# ============================================================================== +if(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=1) +else(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=0) +endif(STATIC) + + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/XMPFilesCoverage.cpp) + source_group("Source Files" FILES ${SOURCE_FILES}) + source_group("Common Files" FILES ${COMMON_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES} ) +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#addding XMP libs and setting output path +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB}) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + + diff --git a/samples/build/cmake/XMPIterations/CMakeLists.txt b/samples/build/cmake/XMPIterations/CMakeLists.txt index b19e501..39d865c 100644 --- a/samples/build/cmake/XMPIterations/CMakeLists.txt +++ b/samples/build/cmake/XMPIterations/CMakeLists.txt @@ -1,81 +1,86 @@ -# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# define minimum cmake version
-cmake_minimum_required(VERSION 3.5.2)
-
-# ==============================================================================
-# Adding Project Name
-# ==============================================================================
-project (XMPIterations)
-
-# ==============================================================================
-if(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=1)
-else(STATIC)
-add_definitions(-DENABLE_CPP_DOM_MODEL=0)
-endif(STATIC)
-
- file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/XMPIterations.cpp)
- source_group("Source Files" FILES ${SOURCE_FILES})
- source_group("Common Files" FILES ${COMMON_FILES})
- include_directories( ${XMP_ROOT} )
- include_directories( ${PUBLIC_INCLUDE} )
- add_executable(${PROJECT_NAME} ${SOURCE_FILES} )
-
-#setting up XMP_BUILDMODE_DIR variable
-SetupInternalBuildDirectory()
-set (BUILD_MODE_LIBNAME "")
-if (USE_BUILDMODE_LIBNAME )
- set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR})
-endif()
-#addding XMP libs and setting output path
-if(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- endif(UNIX)
-else(STATIC)
- if(UNIX)
- if(APPLE) #For Mac
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB})
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- else(APPLE) #For Linux
- SetPlatformLinkFlags(${PROJECT_NAME} "" "")
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} )
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} )
- endif(APPLE)
- else(UNIX) #For Windows
- target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib)
- set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ )
- set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR})
- add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} )
- endif(UNIX)
-endif(STATIC)
-#adding Cocoa for Mac
-ADD_FRAMEWORK(Cocoa ${PROJECT_NAME})
-
-
-
+# ================================================================================================= +# ADOBE SYSTEMS INCORPORATED +# Copyright 2013 Adobe Systems Incorporated +# All Rights Reserved +# +# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +# of the Adobe license agreement accompanying it. +# ================================================================================================= + +# define minimum cmake version +# For Android always build with make 3.6 +if(ANDROID) + cmake_minimum_required(VERSION 3.5.2) +else(ANDROID) + cmake_minimum_required(VERSION 3.15.5) +endif(ANDROID) + +# ============================================================================== +# Adding Project Name +# ============================================================================== +project (XMPIterations) + +# ============================================================================== +if(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=1) +else(STATIC) +add_definitions(-DENABLE_CPP_DOM_MODEL=0) +endif(STATIC) + + file (GLOB SOURCE_FILES ${SAMPLE_SOURCE_ROOT}/XMPIterations.cpp) + source_group("Source Files" FILES ${SOURCE_FILES}) + source_group("Common Files" FILES ${COMMON_FILES}) + include_directories( ${XMP_ROOT} ) + include_directories( ${PUBLIC_INCLUDE} ) + add_executable(${PROJECT_NAME} ${SOURCE_FILES} ) + +#setting up XMP_BUILDMODE_DIR variable +SetupInternalBuildDirectory() +set (BUILD_MODE_LIBNAME "") +if (USE_BUILDMODE_LIBNAME ) + set(BUILD_MODE_LIBNAME ${XMP_BUILDMODE_DIR}) +endif() +#addding XMP libs and setting output path +if(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/lib${XMPFILES_LIB}Static${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}Static${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}Static${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + endif(UNIX) +else(STATIC) + if(UNIX) + if(APPLE) #For Mac + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT}/Versions/A/${XMPCORE_LIB} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT}/Versions/A/${XMPFILES_LIB}) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + else(APPLE) #For Linux + SetPlatformLinkFlags(${PROJECT_NAME} "" "") + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} ) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR} ) + endif(APPLE) + else(UNIX) #For Windows + target_link_libraries(${PROJECT_NAME} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPCORE_LIB}${LIB_EXT} ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/${XMPFILES_LIB}${LIB_EXT} Rpcrt4.lib) + set(OUTPUT_DIR ${SAMPLE_SOURCE_ROOT}/../target/${PLATFORM_FOLDER}/ ) + set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}) + add_custom_command (TARGET ${PROJECT_NAME} COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMP_ROOT}/public/libraries/${PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} ${OUTPUT_DIR}/${XMP_BUILDMODE_DIR} ) + endif(UNIX) +endif(STATIC) +#adding Cocoa for Mac +ADD_FRAMEWORK(Cocoa ${PROJECT_NAME}) + + + |