ADD_DEFINITIONS("-DBINNAME=\"${BINNAME}\"")
ADD_DEFINITIONS("-DLOCALE_DIR=\"${LOCALEDIR}\"")
+IF("${TARGET_LANGUAGE}" STREQUAL "c")
+ ADD_DEFINITIONS(-DTARGET_LANG_C)
+ENDIF()
+
INCLUDE(FindPkgConfig)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -g -O2 -Wall -fPIE")
%setup -q
%build
+
+%if "%{?target_language}" == "c"
+ cmake . -DTARGET_LANGUAGE="c"
+%else
+ cmake . -DTARGET_LANGUAGE="c++"
+%endif
+
cmake . -DCMAKE_INSTALL_PREFIX=/usr
make %{?jobs:-j%jobs}
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(lib)
-ADD_SUBDIRECTORY(examples/efl/cpp)
-#ADD_SUBDIRECTORY(examples/efl/c)
+
+IF("${TARGET_LANGUAGE}" STREQUAL "c")
+ ADD_SUBDIRECTORY(examples/efl/c)
+ELSE()
+ ADD_SUBDIRECTORY(examples/efl/cpp)
+ENDIF()
Evas_Object *content = create_content(base_layout, "ViewMgr Demo<br>Basic View",
view1_prev_btn_clicked_cb, view1_next_btn_clicked_cb);
- ui_standard_view_content_set(view, content, "Page1", NULL, NULL, NULL);
+ ui_standard_view_content_set(view, content, "Page1 C example", NULL, NULL, NULL);
return true;
}
{
UI_VIEWMGR->push_view(new page2());
});
- this->set_content(content, "Page1");
+ this->set_content(content, "Page1 C++ example");
}
public:
* limitations under the License.
*
*/
-//FIXME: C++ app include below.
-#include "efl/mobile/ui_mobile_viewmanager.h"
-//#include "efl/mobile/c/ui_mobile_viewmanager.h"
+
+#ifdef TARGET_LANG_C
+ #include "efl/mobile/c/ui_mobile_viewmanager.h"
+#else
+ #include "efl/mobile/ui_mobile_viewmanager.h"
+#endif
+IF("${TARGET_LANGUAGE}" STREQUAL "c")
SET(SRCS
interface/ui_iface_overlay.cpp
interface/ui_iface_view.cpp
efl/mobile/ui_standard_view.cpp
efl/mobile/ui_key_listener.cpp
efl/mobile/ui_viewmgr.cpp
-# efl/mobile/c/ui_app.cpp
-# efl/mobile/c/ui_menu.cpp
-# efl/mobile/c/ui_popup.cpp
-# efl/mobile/c/ui_view.cpp
-# efl/mobile/c/ui_viewmgr.cpp
+ efl/mobile/c/ui_app.cpp
+ efl/mobile/c/ui_menu.cpp
+ efl/mobile/c/ui_popup.cpp
+ efl/mobile/c/ui_view.cpp
+ efl/mobile/c/ui_viewmgr.cpp
)
+ELSE()
+SET(SRCS
+ interface/ui_iface_overlay.cpp
+ interface/ui_iface_view.cpp
+ interface/ui_iface_viewmgr.cpp
+ interface/ui_iface_app.cpp
+ efl/ui_base_view.cpp
+ efl/ui_base_viewmgr.cpp
+ efl/ui_base_key_listener.cpp
+ efl/ui_base_overlay.cpp
+ efl/mobile/ui_app.cpp
+ efl/mobile/ui_menu.cpp
+ efl/mobile/ui_popup.cpp
+ efl/mobile/ui_view.cpp
+ efl/mobile/ui_standard_view.cpp
+ efl/mobile/ui_key_listener.cpp
+ efl/mobile/ui_viewmgr.cpp
+ )
+ENDIF()
ADD_LIBRARY(${LIBNAME} SHARED ${SRCS})
ADD_DEFINITIONS("-DEXPORT_API=__attribute__((visibility(\"default\")))")