
cmake_minimum_required(VERSION 2.8)

project(pass2)

find_package(Qt5Core REQUIRED)
find_package(Qt5LinguistTools REQUIRED)

include_directories(
  ${Qt5Core_INCLUDE_DIRS}
)

add_definitions(${Qt5Core_DEFINITIONS})

set(my_srcs myi18nobject.cpp)

qt5_create_translation(qm_files ${my_srcs} myobject_de.ts)

add_executable(myobject ${my_srcs} ${qm_files})
target_link_libraries(myobject ${Qt5Core_LIBRARIES})


cmake_minimum_required(VERSION 2.8)

project(pass2)

find_package(Qt5Core REQUIRED)
find_package(Qt5LinguistTools REQUIRED)

include_directories(
  ${Qt5Core_INCLUDE_DIRS}
)

add_definitions(${Qt5Core_DEFINITIONS})

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")

set(my_srcs myi18nobject.cpp)

qt5_create_translation(qm_files ${my_srcs} myobject_de.ts)

add_executable(myobject ${my_srcs} ${qm_files})
target_link_libraries(myobject ${Qt5Core_LIBRARIES})

Make sure -fPIE is added to the compile flags.
Make sure -fPIE is added to the compile flags.

Change-Id: Iedf3f0ff3dbb23753ecb1e0ecbd9b03b3b56a87c
Reviewed-by: Olivier Goffart <e864599d7a41f2378eefc0011707c77a44cbfe1a@woboq.com>
