diff options
author | Hubert Figuière <hub@figuiere.net> | 2021-09-01 10:11:07 -0400 |
---|---|---|
committer | Hubert Figuière <hub@figuiere.net> | 2021-09-01 10:11:07 -0400 |
commit | 77a3fe7096f8ebf301e2bfe1e6dc023b4ff6dc48 (patch) | |
tree | 8b72662eb2d26ea7594db6d57616cff367632494 /samples/build/cmake/CustomSchema/CMakeLists.txt | |
parent | 6a002707a50fc7b10001b5d627fd2528ca64ce5f (diff) | |
parent | f2340cff26eff425ccd2dbf082378dfc62816feb (diff) |
Merge tag 'v2021.08' into adobe-sdk-git
Diffstat (limited to 'samples/build/cmake/CustomSchema/CMakeLists.txt')
-rw-r--r-- | samples/build/cmake/CustomSchema/CMakeLists.txt | 174 |
1 files changed, 87 insertions, 87 deletions
diff --git a/samples/build/cmake/CustomSchema/CMakeLists.txt b/samples/build/cmake/CustomSchema/CMakeLists.txt index 7de7988..faaf454 100644 --- a/samples/build/cmake/CustomSchema/CMakeLists.txt +++ b/samples/build/cmake/CustomSchema/CMakeLists.txt @@ -1,87 +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
-# 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})
-
-
+# ================================================================================================= +# 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}) + + |