+ FIND_PACKAGE( dali-windows-dependencies REQUIRED )
+ FIND_PACKAGE( dali2-core REQUIRED )
+ FIND_PACKAGE( dali2-adaptor REQUIRED )
+ FIND_PACKAGE( dali2-toolkit REQUIRED )
+
+ # Set up the include dir
+ SET( INCLUDE_DIR $ENV{includedir} )
+ IF( NOT INCLUDE_DIR )
+ SET( INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR} )
+ ENDIF()
+ IF( NOT INCLUDE_DIR )
+ SET( INCLUDE_DIR ${PREFIX}/include )
+ ENDIF()
+
+ SET( LIB_DIR $ENV{libdir} )
+ IF( NOT LIB_DIR )
+ SET( LIB_DIR ${CMAKE_INSTALL_LIBDIR} )
+ ENDIF()
+ IF( NOT LIB_DIR )
+ SET( LIB_DIR ${PREFIX}/lib )
+ ENDIF()
+
+ SET( REQUIRED_LIBS
+ PThreads4W::PThreads4W
+ CURL::libcurl
+ ${GETOPT_LIBRARY}
+ ${EXIF_LIBRARY}
+ ${PNG_LIBRARIES}
+ ${GIF_LIBRARIES}
+ JPEG::JPEG
+ ${TURBO_JPEG_LIBRARY}
+ unofficial::fontconfig::fontconfig
+ Freetype::Freetype
+ harfbuzz::harfbuzz
+ ${FRIBIDI_LIBRARY}
+ unofficial::angle::libEGL
+ unofficial::angle::libGLESv2
+ unofficial::cairo::cairo
+ dali-windows-dependencies::dali-windows-dependencies
+ dali2-core::dali2-core
+ dali2-adaptor::dali2-adaptor
+ dali2-toolkit::dali2-toolkit
+ )
+ELSEIF( UNIX )
+ SET( REQUIRED_LIBS
+ ${REQUIRED_PKGS_LDFLAGS}
+ -pie
+ )
+ENDIF()
+
+SET(DALI_DEMO_CFLAGS "-DDEMO_GAME_DIR=${DEMO_GAME_DIR} -DDEMO_IMAGE_DIR=${DEMO_IMAGE_DIR} -DDEMO_VIDEO_DIR=${DEMO_VIDEO_DIR} -DDEMO_MODEL_DIR=${DEMO_MODEL_DIR} -DDEMO_SCRIPT_DIR=${DEMO_SCRIPT_DIR} -DDEMO_SHADER_DIR=${DEMO_SHADER_DIR} -DDEMO_STYLE_DIR=${DEMO_STYLE_DIR} -DDEMO_THEME_PATH=${DEMO_THEME_PATH} -DDEMO_EXAMPLE_BIN=${DEMO_EXAMPLE_BIN} -DDEMO_LOCALE_DIR=${DEMO_LOCALE_DIR} -DDEMO_LANG=${DEMO_LANG}")
+
+IF( ENABLE_DEBUG )
+ SET(DALI_DEMO_CFLAGS "${DALI_DEMO_CFLAGS} -DDEBUG_ENABLED")
+ENDIF()
+
+IF( UNIX )
+ IF( NOT ${ENABLE_EXPORTALL} )
+ ADD_DEFINITIONS( "-DHIDE_DALI_INTERNALS" )
+ ENDIF()
+ENDIF()
+
+###########################################################################
+# Internationalization
+
+IF (UNIX)
+ SET(PO_DIR ${RESOURCE_DIR}/po)
+
+ FILE(GLOB PO_FILES RELATIVE "${PO_DIR}" "${PO_DIR}/*.po")
+
+ SET(MSGFMT "/usr/bin/msgfmt")
+ SET(MO_FILES_DIR ${CMAKE_BINARY_DIR}/mo)
+ FILE(MAKE_DIRECTORY ${MO_FILES_DIR})
+
+ FOREACH(PO_FILE ${PO_FILES})
+ SET(PO_FILE ${PO_DIR}/${PO_FILE})
+ MESSAGE("PO: ${PO_FILE}")
+ GET_FILENAME_COMPONENT(ABS_PO_FILE ${PO_FILE} ABSOLUTE)
+ GET_FILENAME_COMPONENT(lang ${ABS_PO_FILE} NAME_WE)
+ SET(MO_FILE ${MO_FILES_DIR}/${lang}.mo)
+ ADD_CUSTOM_COMMAND(OUTPUT ${MO_FILE}
+ COMMAND ${MSGFMT} -o ${MO_FILE} ${ABS_PO_FILE}
+ DEPENDS ${ABS_PO_FILE})
+ INSTALL(FILES ${MO_FILE} DESTINATION ${LOCALE_DIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+ SET(MO_FILES ${MO_FILES} ${MO_FILE})
+ ENDFOREACH(PO_FILE)
+
+ MESSAGE(".mo files: ${MO_FILES}")
+ ADD_CUSTOM_TARGET(po ALL DEPENDS ${MO_FILES})
+ENDIF()
+
+IF (INTERNATIONALIZATION)
+ SET(DALI_DEMO_CFLAGS "${DALI_DEMO_CFLAGS} -DINTERNATIONALIZATION_ENABLED")
+ENDIF(INTERNATIONALIZATION)
+
+###########################################################################
+
+IF( WIN32 )
+ ADD_COMPILE_OPTIONS( /FIdali-windows-dependencies.h ) # Adds missing definitions.
+ ADD_COMPILE_OPTIONS( /vmg ) # Avoids a 'reinterpret_cast' compile error while compiling signals and callbacks.
+ ADD_COMPILE_OPTIONS( /wd4251 ) # Ignores warning C4251: "'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'"
+ELSE()
+ SET(DALI_DEMO_CFLAGS "${DALI_DEMO_CFLAGS} -Werror -Wall -fPIE")
+
+ IF( NOT ${ENABLE_EXPORTALL} )
+ SET(DALI_DEMO_CFLAGS "${DALI_DEMO_CFLAGS} -fvisibility=hidden")
+ ENDIF()
+ENDIF()
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${REQUIRED_CFLAGS} ${DALI_DEMO_CFLAGS}")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}")
+
+INCLUDE_DIRECTORIES(
+ ${SYSTEM_INCLUDE_DIR}
+ ${ROOT_SRC_DIR}
+ ${VCPKG_INCLUDE_DIR}
+ ${INCLUDE_DIR}
+)
+
+IF(ANDROID)
+ INCLUDE_DIRECTORIES( ${ANDROID_NDK}/sources/android/native_app_glue )
+ INCLUDE_DIRECTORIES( ${ANDROID_NDK}/sysroot/usr )
+ INCLUDE_DIRECTORIES( ${ANDROID_NDK}/sysroot/usr/include/android )
+ INCLUDE_DIRECTORIES( ${ROOT_SRC_DIR}/build/android/app/src/main/cpp )
+ENDIF()
+
+LINK_DIRECTORIES(${LIB_DIR})