diff options
Diffstat (limited to 'samples/build/cmake/ReadingXMPNewDOM/CMakeLists.txt')
-rw-r--r-- | samples/build/cmake/ReadingXMPNewDOM/CMakeLists.txt | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/samples/build/cmake/ReadingXMPNewDOM/CMakeLists.txt b/samples/build/cmake/ReadingXMPNewDOM/CMakeLists.txt new file mode 100644 index 0000000..51682cc --- /dev/null +++ b/samples/build/cmake/ReadingXMPNewDOM/CMakeLists.txt @@ -0,0 +1,90 @@ +# =================================================================================================
+# 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})
+
+
+
|