CMake for MS Windows command line 63/230963/2
authorVictor Cebollada <v.cebollada@samsung.com>
Thu, 27 Feb 2020 13:39:29 +0000 (13:39 +0000)
committerVíctor Cebollada <v.cebollada@samsung.com>
Thu, 16 Apr 2020 08:08:32 +0000 (08:08 +0000)
Change-Id: I5a73c87ae9f6b609273ac88ed6ef041dcf3ae810
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
(cherry picked from commit 6af0f8f844c02f091612cc3c4e200b9a05e926a0)

.gitignore
README.md
build/tizen/CMakeLists.txt
build/tizen/builder/CMakeLists.txt
build/tizen/demo/CMakeLists.txt
build/tizen/examples-reel/CMakeLists.txt
build/tizen/examples/CMakeLists.txt
build/tizen/tests-reel/CMakeLists.txt

index f0bed25..943a66c 100644 (file)
@@ -45,3 +45,31 @@ simple-image-wall.js
 /debugsources.list
 /com.samsung.dali-demo-debuginfo.manifest
 /com.samsung.dali-demo-debugsource.manifest
+/build/tizen/*.vcxproj
+/build/tizen/*.vcxproj.filters
+/build/tizen/builder/Debug/*
+/build/tizen/builder/Release/*
+/build/tizen/builder/*.dir
+/build/tizen/builder/*.vcxproj
+/build/tizen/builder/*.vcxproj.filters
+/build/tizen/demo/Debug/*
+/build/tizen/demo/Release/*
+/build/tizen/demo/*.dir
+/build/tizen/demo/*.vcxproj
+/build/tizen/demo/*.vcxproj.filters
+/build/tizen/examples/Debug/*
+/build/tizen/examples/Release/*
+/build/tizen/examples/*.dir
+/build/tizen/examples/*.vcxproj
+/build/tizen/examples/*.vcxproj.filters
+/build/tizen/examples-reel/Debug/*
+/build/tizen/examples-reel/Release/*
+/build/tizen/examples-reel/*.dir
+/build/tizen/examples-reel/*.vcxproj
+/build/tizen/examples-reel/*.vcxproj.filters
+/build/tizen/tests-reel/Debug/*
+/build/tizen/tests-reel/Release/*
+/build/tizen/tests-reel/*.dir
+/build/tizen/tests-reel/*.vcxproj
+/build/tizen/tests-reel/*.vcxproj.filters
+
index cebd1db..140fd00 100644 (file)
--- a/README.md
+++ b/README.md
          * [NON-SMACK Targets](#non-smack-targets)
          * [SMACK enabled Targets](#smack-enabled-targets)
          * [DEBUG Builds](#debug-builds-1)
+      * [3. Building for Android](#3-android-builds)
+      * [4. Building for MS Windows](#4-windows-builds)
+         * Build with the Visual Studio project.
+         * Build with CMake.
    * [Creating an example](#creating-an-example)
 
 # Build Instructions
@@ -112,4 +116,56 @@ To install apks:
          $ adb install -r ./app/build/outputs/apk/debug/dali-demo-debug.apk
          $ adb install -r ./app/build/outputs/apk/release/dali-demo-release.apk
 
+## 4. Building for MS Windows
 
+Third party dependencies are built using vcpkg. Instructions on how to install vcpkg can be found in the
+vcpkg-script folder in the windows-dependencies repository.
+
+- Download the windows-dependencies repository from DaliHub
+
+         $ git clone https://github.com/dalihub/windows-dependencies.git
+
+- Read the windows-dependencies/vcpkg-script/Readme.md file for more instructions on how to build and install the third-party dependencies.
+
+### Build with the Visual Studio project
+  Read the windows-dependencies/README.md file for more instructions on how to build and run DALi for MS Windows.
+
+### Build with CMake
+
+  * Requirements
+    It's required the version 3.12.2 of CMake and a Git Bash Shell.
+
+  * Notes and troubleshoting:
+    It should be possible to use the MS Visual studio Developer Command Prompt (https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs) to build DALi from the command line.
+    However, the CMake version installed with MS Visual Studio 2017 is a bit out of date and some VCPKG modules require a higher version.
+    This instructions have been tested with CMake 3.12.2 on a Git Bash shell.
+
+  * Define an environment variable to set the path to the VCPKG folder
+
+    $ export VCPKG_FOLDER=C:/Users/username/Workspace/VCPKG_TOOL
+
+  * Define an environment variable to set the path where DALi is going to be installed.
+
+    $ export DALI_ENV_FOLDER=C:/Users/username/Workspace/dali-env
+
+  * Execute the following commands to create the makefiles, build and install DALi.
+
+    $ cmake -g Ninja . -DCMAKE_TOOLCHAIN_FILE=$VCPKG_FOLDER/vcpkg/scripts/buildsystems/vcpkg.cmake -DENABLE_PKG_CONFIGURE=OFF -DINTERNATIONALIZATION=OFF -DCMAKE_INSTALL_PREFIX=$DALI_ENV_FOLDER
+    $ cmake --build . --target install
+
+  * Options:
+    - CMAKE_TOOLCHAIN_FILE  ---> Needed to find packages installed by VCPKG.
+    - ENABLE_PKG_CONFIGURE  ---> Whether to install pkg configure files (not currently working on MS Windows. CMake modules used instead).
+    - INTERNATIONALIZATION  ---> Whether to generate and install internazionalization '.po' Portable Object files.
+    - CMAKE_INSTALL_PREFIX  ---> Were DALi is installed.
+    - ENABLE_DEBUG          ---> Whether to build with debug enabled.
+
+  * If dali-toolkit has been compiled with the USE_DEFAULT_RESOURCE_DIR option disabled then is needed to set global environment variables in order to find the default toolkit resources.
+
+    i.e
+    $ setx DALI_ENV_FOLDER C:/Users/username/dali-env
+    $ setx DALI_IMAGE_DIR $DALI_ENV_FOLDER/share/dali/toolkit/images/
+    $ setx DALI_SOUND_DIR $DALI_ENV_FOLDER/share/dali/toolkit/sounds/
+    $ setx DALI_STYLE_DIR $DALI_ENV_FOLDER/share/dali/toolkit/styles/
+    $ setx DALI_STYLE_IMAGE_DIR $DALI_ENV_FOLDER/share/dali/toolkit/styles/images/
+    $ setx DALI_DATA_READ_ONLY_DIR $DALI_ENV_FOLDER/share/dali/
index 53fa788..5899745 100644 (file)
@@ -11,8 +11,14 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
   endif()
 endif()
 
-SET(ROOT_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..)
-SET(DEMO_SHARED ${CMAKE_CURRENT_SOURCE_DIR}/../../shared)
+# Define options to CMake
+OPTION(ENABLE_EXPORTALL          "Enable Export all symbols" OFF)
+OPTION(ENABLE_DEBUG              "Enable Debug" OFF)
+OPTION(ENABLE_PKG_CONFIGURE      "Use pkgconfig" ON)
+OPTION(INTERNATIONALIZATION      "Internationalization demo string names" ON)
+
+SET(ROOT_SRC_DIR ${CMAKE_SOURCE_DIR}/../..)
+SET(DEMO_SHARED ${CMAKE_SOURCE_DIR}/../../shared)
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 
@@ -29,9 +35,16 @@ ELSE()
 ENDIF()
 
 MESSAGE( STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE} )
-if(CMAKE_BUILD_TYPE MATCHES Debug)
-    MESSAGE("Setting variable: DEBUG_ENABLED")
-    SET(DEBUG_ENABLED "1")
+
+IF(CMAKE_BUILD_TYPE MATCHES Debug)
+  SET( ENABLE_DEBUG ON )
+ENDIF()
+
+IF( ENABLE_DEBUG )
+  MESSAGE( STATUS "CMAKE_BUILD_TYPE: " Debug )
+  SET( ENABLE_EXPORTALL ON )
+ELSE()
+  MESSAGE( STATUS "CMAKE_BUILD_TYPE: " Release )
 ENDIF()
 
 SET(RESOURCE_DIR ${ROOT_SRC_DIR}/resources)
@@ -70,7 +83,7 @@ IF(DEFINED DALI_DEMO_RES_DIR)
   SET(DEMO_SHADER_DIR \\"${DALI_DEMO_RES_DIR}/shaders/\\")
   SET(DEMO_STYLE_DIR \\"${DALI_DEMO_RES_DIR}/style/\\")
   SET(DEMO_THEME_PATH \\"${DALI_DEMO_RES_DIR}/style/demo-theme.json\\")
-  SET(DEMO_LOCALE_DIR \\"${DALI_DEMO_RES_DIR}/locale\\")
+  SET(DEMO_LOCALE_DIR \\"${DALI_DEMO_RES_DIR}/locale/\\")
   SET(DEMO_STYLE_IMAGE_DIR \\"${DALI_DEMO_RES_DIR}/style/images\\")
 ELSE()
   SET(DEMO_GAME_DIR \\"${GAME_DIR}\\")
@@ -152,35 +165,115 @@ FOREACH(flag ${LOCAL_STYLE_IMAGES_LIST})
 ENDFOREACH(flag)
 MESSAGE("Installed style resources ${LOCAL_STYLE_IMAGES_LIST} to ${STYLE_DIR}/images")
 
-SET(PKG_LIST dali-core
-             dali-adaptor
-             dali-toolkit)
+IF( ENABLE_PKG_CONFIGURE )
+  SET(PKG_LIST dali-core
+               dali-adaptor
+               dali-toolkit)
 
-INCLUDE(FindPkgConfig)
-pkg_check_modules(REQUIRED_PKGS REQUIRED ${PKG_LIST})
+  INCLUDE(FindPkgConfig)
+  pkg_check_modules(REQUIRED_PKGS REQUIRED ${PKG_LIST})
 
-FOREACH(flag ${REQUIRED_PKGS_CFLAGS})
+  FOREACH(flag ${REQUIRED_PKGS_CFLAGS})
         SET(REQUIRED_CFLAGS "${REQUIRED_CFLAGS} ${flag}")
-ENDFOREACH(flag)
+  ENDFOREACH(flag)
+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} -fvisibility=hidden -DHIDE_DALI_INTERNALS -DDEMO_LANG=${DEMO_LANG}")
+SET( VCPKG_INCLUDE_DIR "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include")
+
+IF( WIN32 ) # WIN32 includes x64 as well according to the cmake doc.
+  FIND_PACKAGE( pthreads REQUIRED )
+  FIND_PACKAGE( curl REQUIRED )
+  FIND_LIBRARY( GETOPT_LIBRARY NAMES getopt )
+  FIND_LIBRARY( EXIF_LIBRARY NAMES libexif )
+
+  FIND_PACKAGE( png REQUIRED )
+  FIND_PACKAGE( gif REQUIRED )
+  FIND_PACKAGE( jpeg REQUIRED )
+  FIND_LIBRARY( TURBO_JPEG_LIBRARY NAMES turbojpeg )
+
+  FIND_PACKAGE( unofficial-fontconfig REQUIRED )
+  FIND_PACKAGE( freetype REQUIRED )
+  FIND_PACKAGE( harfbuzz REQUIRED )
+  FIND_LIBRARY( FRIBIDI_LIBRARY NAMES fribidi )
+
+  FIND_PACKAGE( unofficial-angle REQUIRED )
+  FIND_PACKAGE( unofficial-cairo REQUIRED )
+
+  FIND_PACKAGE( dali-windows-dependencies REQUIRED )
+  FIND_PACKAGE( dali-core REQUIRED )
+  FIND_PACKAGE( dali-adaptor REQUIRED )
+  FIND_PACKAGE( dali-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
+    dali-core::dali-core
+    dali-adaptor::dali-adaptor
+    dali-toolkit::dali-toolkit
+  )
+ELSEIF( UNIX )
+  SET( REQUIRED_LIBS
+    ${REQUIRED_PKGS_LDFLAGS}
+    -pie
+  )
+ENDIF()
 
-IF(DEFINED DEBUG_ENABLED)
+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
 
-SET(PO_DIR ${RESOURCE_DIR}/po)
+IF (UNIX)
+  SET(PO_DIR ${RESOURCE_DIR}/po)
 
-FILE(GLOB PO_FILES RELATIVE "${PO_DIR}" "${PO_DIR}/*.po")
+  FILE(GLOB PO_FILES RELATIVE "${PO_DIR}" "${PO_DIR}/*.po")
 
-SET(MSGFMT "/usr/bin/msgfmt")
-SET(MO_FILES_DIR ${CMAKE_CURRENT_BINARY_DIR}/mo)
-FILE(MAKE_DIRECTORY ${MO_FILES_DIR})
+  SET(MSGFMT "/usr/bin/msgfmt")
+  SET(MO_FILES_DIR ${CMAKE_BINARY_DIR}/mo)
+  FILE(MAKE_DIRECTORY ${MO_FILES_DIR})
 
-FOREACH(PO_FILE ${PO_FILES})
+  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)
@@ -191,22 +284,40 @@ FOREACH(PO_FILE ${PO_FILES})
                            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)
+  ENDFOREACH(PO_FILE)
 
-MESSAGE(".mo files: ${MO_FILES}")
-ADD_CUSTOM_TARGET(po ALL DEPENDS ${MO_FILES})
+  MESSAGE(".mo files: ${MO_FILES}")
+  ADD_CUSTOM_TARGET(po ALL DEPENDS ${MO_FILES})
+ENDIF()
 
-OPTION(INTERNATIONALIZATION "Internationalization demo string names" ON)
 IF (INTERNATIONALIZATION)
-        SET(DALI_DEMO_CFLAGS "${DALI_DEMO_CFLAGS} -DINTERNATIONALIZATION_ENABLED")
+  SET(DALI_DEMO_CFLAGS "${DALI_DEMO_CFLAGS} -DINTERNATIONALIZATION_ENABLED")
 ENDIF(INTERNATIONALIZATION)
 
 ###########################################################################
 
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${REQUIRED_CFLAGS} ${DALI_DEMO_CFLAGS} -Werror -Wall -fPIE")
+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(${ROOT_SRC_DIR})
+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 )
@@ -214,8 +325,23 @@ IF(ANDROID)
   INCLUDE_DIRECTORIES( ${ROOT_SRC_DIR}/build/android/app/src/main/cpp )
 ENDIF()
 
+LINK_DIRECTORIES(${LIB_DIR})
+
 ADD_SUBDIRECTORY(demo)
 ADD_SUBDIRECTORY(examples)
 ADD_SUBDIRECTORY(examples-reel)
 ADD_SUBDIRECTORY(tests-reel)
 ADD_SUBDIRECTORY(builder)
+
+
+MESSAGE( " Folder   DEMO_IMAGE_DIR : [" ${DEMO_IMAGE_DIR} "]" )
+MESSAGE( " Folder   DEMO_STYLE_DIR : [" ${DEMO_STYLE_DIR} "]" )
+MESSAGE( " Folder  DEMO_SHADER_DIR : [" ${DEMO_SHADER_DIR} "]" )
+MESSAGE( " Folder  DEMO_THEME_PATH : [" ${DEMO_THEME_PATH} "]" )
+MESSAGE( " Folder    DEMO_GAME_DIR : [" ${DEMO_GAME_DIR} "]" )
+MESSAGE( " Folder   DEMO_VIDEO_DIR : [" ${DEMO_VIDEO_DIR} "]" )
+MESSAGE( " Folder   DEMO_MODEL_DIR : [" ${DEMO_MODEL_DIR} "]" )
+MESSAGE( " Folder  DEMO_SCRIPT_DIR : [" ${DEMO_SCRIPT_DIR} "]" )
+MESSAGE( " Folder  DEMO_LOCALE_DIR : [" ${DEMO_LOCALE_DIR} "]" )
+MESSAGE( " Folder DEMO_EXAMPLE_BIN : [" ${DEMO_EXAMPLE_BIN} "]" )
+MESSAGE( " Folder        DEMO_LANG : [" ${DEMO_LANG} "]" )
index 06c7068..5fcd331 100644 (file)
@@ -7,5 +7,7 @@ IF(SHARED)
 ELSE()
   ADD_EXECUTABLE(dali-builder ${DALI_BUILDER_SRCS})
 ENDIF()
-TARGET_LINK_LIBRARIES(dali-builder ${REQUIRED_PKGS_LDFLAGS} -pie)
+
+TARGET_LINK_LIBRARIES(dali-builder ${REQUIRED_LIBS})
+
 INSTALL(TARGETS dali-builder DESTINATION ${BINDIR})
index ac3c3f5..af1ed2a 100644 (file)
@@ -8,7 +8,12 @@ SET(DEMO_SRCS
   "${ROOT_SRC_DIR}/shared/dali-table-view.cpp"
 )
 
-IF(ANDROID)
+IF(WIN32)
+  SET(DEMO_SRCS
+    ${DEMO_SRCS}
+    "${ROOT_SRC_DIR}/shared/execute-process-win.cpp"
+  )
+ELSEIF(ANDROID)
   SET(DEMO_SRCS
     ${DEMO_SRCS}
     "${ROOT_SRC_DIR}/shared/execute-process-android.cpp"
@@ -26,7 +31,7 @@ ELSE()
   ADD_EXECUTABLE(${PROJECT_NAME} ${DEMO_SRCS})
 ENDIF()
 
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${REQUIRED_PKGS_LDFLAGS} -pie)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${REQUIRED_LIBS})
 
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
 
index aae2efd..16f2a0e 100644 (file)
@@ -8,7 +8,12 @@ SET(EXAMPLES_REEL_SRCS
   "${ROOT_SRC_DIR}/shared/dali-table-view.cpp"
 )
 
-IF(ANDROID)
+IF(WIN32)
+  SET(EXAMPLES_REEL_SRCS
+    ${EXAMPLES_REEL_SRCS}
+    "${ROOT_SRC_DIR}/shared/execute-process-win.cpp"
+  )
+ELSEIF(ANDROID)
   SET(EXAMPLES_REEL_SRCS
     ${EXAMPLES_REEL_SRCS}
     "${ROOT_SRC_DIR}/shared/execute-process-android.cpp"
@@ -26,7 +31,7 @@ ELSE()
   ADD_EXECUTABLE(dali-examples ${EXAMPLES_REEL_SRCS})
 ENDIF()
 
-TARGET_LINK_LIBRARIES(dali-examples ${REQUIRED_PKGS_LDFLAGS} -pie)
+TARGET_LINK_LIBRARIES(dali-examples ${REQUIRED_LIBS})
 
 INSTALL(TARGETS dali-examples DESTINATION ${BINDIR})
 
index 3a55570..e84235c 100644 (file)
@@ -21,6 +21,6 @@ FOREACH(EXAMPLE ${SUBDIRS})
   ELSE()
     ADD_EXECUTABLE(${EXAMPLE}.example ${SRCS})
   ENDIF()
-  TARGET_LINK_LIBRARIES(${EXAMPLE}.example ${REQUIRED_PKGS_LDFLAGS} -pie)
+  TARGET_LINK_LIBRARIES(${EXAMPLE}.example ${REQUIRED_LIBS})
   INSTALL(TARGETS ${EXAMPLE}.example DESTINATION ${BINDIR})
 ENDFOREACH(EXAMPLE)
index 6c69839..728e6d4 100644 (file)
@@ -8,7 +8,12 @@ SET(TESTS_REEL_SRCS
   "${ROOT_SRC_DIR}/shared/dali-table-view.cpp"
 )
 
-IF(ANDROID)
+IF(WIN32)
+  SET(TESTS_REEL_SRCS
+    ${TESTS_REEL_SRCS}
+    "${ROOT_SRC_DIR}/shared/execute-process-win.cpp"
+  )
+ELSEIF(ANDROID)
   SET(TESTS_REEL_SRCS
     ${TESTS_REEL_SRCS}
     "${ROOT_SRC_DIR}/shared/execute-process-android.cpp"
@@ -25,7 +30,8 @@ IF(SHARED)
 ELSE()
   ADD_EXECUTABLE(dali-tests ${TESTS_REEL_SRCS})
 ENDIF()
-TARGET_LINK_LIBRARIES(dali-tests ${REQUIRED_PKGS_LDFLAGS} -pie)
+
+TARGET_LINK_LIBRARIES(dali-tests ${REQUIRED_LIBS})
 
 INSTALL(TARGETS dali-tests DESTINATION ${BINDIR})