Permalink
Browse files

changed config so that we can build it now

  • Loading branch information...
1 parent 59d216f commit e1ae534648a164328d29596c8c70f98ada6c30a0 @juzna committed May 30, 2011
Showing with 91 additions and 11 deletions.
  1. +28 −2 CMakeLists.txt
  2. +1 −1 PluginConfig.cmake
  3. +62 −8 X11/projectDef.cmake
View
@@ -16,8 +16,17 @@ file (GLOB GENERAL RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
[^.]*.cmake
)
-SET(CORE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/linphone/")
-INCLUDE_DIRECTORIES(${CORE_PATH}/oRTP/include ${CORE_PATH}/mediastreamer2/include ${CORE_PATH}/coreapi ${CORE_PATH}/ ${PLUGIN_INCLUDE_DIRS})
+INCLUDE_DIRECTORIES(${PLUGIN_INCLUDE_DIRS})
+
+
+# add linphone core includes
+SET(LINPHONE_CORE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/3rdParty/linphone/")
+INCLUDE_DIRECTORIES(
+ ${LINPHONE_CORE_PATH}/oRTP/include
+ ${LINPHONE_CORE_PATH}/mediastreamer2/include
+ ${LINPHONE_CORE_PATH}/coreapi
+ ${LINPHONE_CORE_PATH}/
+)
# Generated files are stored in ${GENERATED} by the project configuration
SET_SOURCE_FILES_PROPERTIES(
@@ -35,6 +44,23 @@ SET( SOURCES
${GENERATED}
)
+#SET(CPACK_GENERATOR "STGZ;TGZ;TZ;ZIP")
+SET(CPACK_GENERATOR "ZIP")
+SET(CPACK_PACKAGE_NAME "linphone-js")
+SET(CPACK_PACKAGE_FILE_NAME "linphone-js")
+
# This will include Win/projectDef.cmake, X11/projectDef.cmake, Mac/projectDef
# depending on the platform
include_platform()
+
+#message("Will generate ${CPACK_GENERATOR}")
+
+INSTALL(TARGETS ${PLUGIN_NAME}
+ DESTINATION lib/mozilla/plugins
+# RUNTIME DESTINATION bin
+# LIBRARY DESTINATION lib
+# ARCHIVE DESTINATION lib
+)
+
+# must be last one, because it overwrites variables otherwise
+INCLUDE(CPack)
View
@@ -5,7 +5,7 @@
#
#\**********************************************************/
-set(PLUGIN_NAME "linphone")
+set(PLUGIN_NAME "linphone-js")
set(PLUGIN_PREFIX "LIN")
set(COMPANY_NAME "juznacz")
View
@@ -15,14 +15,37 @@ file (GLOB PLATFORM RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
SOURCE_GROUP(X11 FILES ${PLATFORM})
-# linphone libraries
-SET(PLUGIN_INTERNAL_DEPS ${PLUGIN_INTERNAL_DEPS}
- ${CORE_PATH}/coreapi/.libs/liblinphone.so
- ${CORE_PATH}/mediastreamer2/src/.libs/libmediastreamer.so
- ${CORE_PATH}/oRTP/src/.libs/libortp.so
- -lspeex
- -losipparser2
- -losip2
+# linphone core libraries
+#add_subdirectory(${LINPHONE_CORE_PATH})
+
+add_library(LIB_CORE SHARED IMPORTED)
+set_property(TARGET LIB_CORE PROPERTY IMPORTED_LOCATION ${LINPHONE_CORE_PATH}/coreapi/.libs/liblinphone.so)
+
+SET(LINPHONE_LIBS
+ ${LINPHONE_CORE_PATH}/coreapi/.libs/liblinphone.so
+ #LIB_CORE
+ ${LINPHONE_CORE_PATH}/mediastreamer2/src/.libs/libmediastreamer.so
+ ${LINPHONE_CORE_PATH}/oRTP/src/.libs/libortp.so
+)
+
+find_library(LIB_SPEEX speex)
+find_library(LIB_SIPPARSER osipparser2)
+find_library(LIB_OSIP osip2)
+
+
+#INSTALL(TARGETS LIB_CORE
+# RUNTIME DESTINATION bin
+# LIBRARY DESTINATION lib
+# ARCHIVE DESTINATION lib
+#)
+
+
+message("Found libs in ${LIB_SPEEX}, ${LIB_SIPPARSER}, ${LIB_OSIP}")
+
+SET(MORE_LIBS
+ ${LIB_SPEEX}
+ ${LIB_SIPPARSER}
+ ${LIB_OSIP}
)
@@ -40,4 +63,35 @@ add_x11_plugin(${PROJECT_NAME} SOURCES)
# add library dependencies here; leave ${PLUGIN_INTERNAL_DEPS} there unless you know what you're doing!
target_link_libraries(${PROJECT_NAME}
${PLUGIN_INTERNAL_DEPS}
+ ${LINPHONE_LIBS}
+ ${MORE_LIBS}
)
+
+SET(CPACK_GENERATOR "${CPACK_GENERATOR};DEB")
+SET(CPACK_PACKAGE_VENDOR "juzna.cz")
+SET(CPACK_DEBIAN_PACKAGE_NAME linphone-js)
+SET(CPACK_DEBIAN_PACKAGE_VERSION 0.1)
+SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64)
+SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Jan Dolecek <juzna.cz@gmail.com>")
+SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Linphone wrapper for JavaScript")
+
+SET(DEPS_MEDIASTREAMER "libasound2 (>> 1.0.22), libavcodec52 (>= 4:0.5+svn20090706-3) | libavcodec-extra-52 (>= 4:0.5+svn20090706-3), libgsm1 (>= 1.0.13), libogg0 (>= 1.0rc3), libsdl1.2debian (>= 1.2.10-1), libspeex1 (>= 1.2~beta3-1), libspeexdsp1 (>= 1.2~beta3.2-1), libswscale0 (>= 4:0.5+svn20090706-3) | libswscale-extra-0 (>= 4:0.5+svn20090706-3), libtheora0 (>= 0.0.0.alpha7.dfsg), libx11-6")
+SET(DEPS_CORE "libspeex1, libosip2-4, libexosip2-4")
+SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${DEPS_MEDIASTREAMER},${DEPS_CORE}")
+
+
+# file(INSTALL ${LINPHONE_LIBS} DESTINATION lib)
+
+SET(LINPHONE_LIBS_R
+ ${LINPHONE_CORE_PATH}/coreapi/.libs/liblinphone.so
+ ${LINPHONE_CORE_PATH}/coreapi/.libs/liblinphone.so.4
+ ${LINPHONE_CORE_PATH}/coreapi/.libs/liblinphone.so.4.0.0
+ ${LINPHONE_CORE_PATH}/mediastreamer2/src/.libs/libmediastreamer.so
+ ${LINPHONE_CORE_PATH}/mediastreamer2/src/.libs/libmediastreamer.so.1
+ ${LINPHONE_CORE_PATH}/mediastreamer2/src/.libs/libmediastreamer.so.1.0.0
+ ${LINPHONE_CORE_PATH}/oRTP/src/.libs/libortp.so
+ ${LINPHONE_CORE_PATH}/oRTP/src/.libs/libortp.so.8
+ ${LINPHONE_CORE_PATH}/oRTP/src/.libs/libortp.so.8.0.0
+)
+INSTALL(PROGRAMS ${LINPHONE_LIBS_R} DESTINATION lib)
+

0 comments on commit e1ae534

Please sign in to comment.