Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Attempt to fix CRLF issues

  • Loading branch information...
commit 93116acc4921022fbc83b96f5933663d3388f0e6 1 parent f1d5d4b
Richard Bateman authored
Showing with 16,234 additions and 16,234 deletions.
  1. +93 −93 CMakeLists.txt
  2. +1,656 −1,656 Doxyfile
  3. +66 −66 cmake/FixFragment.xslt
  4. +85 −85 cmake/buildconfig.cmake
  5. +256 −256 cmake/common.cmake
  6. +2 −2 cmake/dummy.cpp
  7. +40 −40 cmake/paths.cmake
  8. +134 −134 cmake/projectConfig_main.cmake.in
  9. +208 −208 cmake/wix.cmake
  10. +71 −71 common.cmd
  11. +53 −53 examples/BasicMediaPlayer/CMakeLists.txt
  12. +4 −4 examples/BasicMediaPlayer/Mac/bundle_template/InfoPlist.strings
  13. +18 −18 examples/BasicMediaPlayer/Mac/bundle_template/Localized.r
  14. +60 −60 examples/BasicMediaPlayer/PluginConfig.cmake
  15. +38 −38 examples/BasicMediaPlayer/Win/WiX/BasicMediaPlayerInstaller.wxs
  16. +56 −56 examples/BasicMediaPlayer/Win/projectDef.cmake
  17. +4 −4 examples/FBTestPlugin/Mac/bundle_template/InfoPlist.strings
  18. +20 −20 examples/FBTestPlugin/Mac/bundle_template/Localized.r
  19. +107 −107 examples/FBTestPlugin/SimpleStreams.cpp
  20. +118 −118 examples/FBTestPlugin/ThreadRunnerAPI.cpp
  21. +51 −51 examples/FBTestPlugin/ThreadRunnerAPI.h
  22. +38 −38 examples/FBTestPlugin/Win/WiX/FBTestPluginInstaller.wxs
  23. +30 −30 examples/FBTestPlugin/Win/dllmain.cpp
  24. +302 −302 examples/FBTestPlugin/test.html
  25. +4 −4 fbgen/src/Mac/bundle_template/InfoPlist.strings
  26. +20 −20 fbgen/src/Mac/bundle_template/Localized.r
  27. +38 −38 fbgen/src/Win/WiX/TemplateInstaller.wxs
  28. +32 −32 gen_templates/COM_config.h
  29. +78 −78 gen_templates/FBControl.rgs
  30. +16 −16 gen_templates/FireBreathWin.def
  31. +81 −81 gen_templates/FireBreathWin.idl
  32. +17 −17 gen_templates/FireBreathWin.rgs
  33. +111 −111 gen_templates/firebreathWin.rc
  34. +29 −29 gen_templates/resource.h
  35. +10 −10 gen_templates/version_script.txt
  36. +16 −16 pluginProjects.cmake
  37. +7 −7 prep2005.cmd
  38. +7 −7 prep2008.cmd
  39. +7 −7 prep2010.cmd
  40. +78 −78 src/ActiveXCore/AXDOM/Document.cpp
  41. +61 −61 src/ActiveXCore/AXDOM/Document.h
  42. +70 −70 src/ActiveXCore/AXDOM/Element.cpp
  43. +53 −53 src/ActiveXCore/AXDOM/Element.h
  44. +55 −55 src/ActiveXCore/AXDOM/Node.h
  45. +56 −56 src/ActiveXCore/AXDOM/Window.cpp
  46. +53 −53 src/ActiveXCore/AXDOM/Window.h
  47. +90 −90 src/ActiveXCore/ActiveXBrowserHost.h
  48. +85 −85 src/ActiveXCore/COMJavascriptObject.h
  49. +33 −33 src/ActiveXCore/FBControl.cpp
  50. +493 −493 src/ActiveXCore/FBControl.h
  51. +413 −413 src/ActiveXCore/IDispatchAPI.cpp
  52. +82 −82 src/ActiveXCore/IDispatchAPI.h
  53. +319 −319 src/ActiveXCore/axstream.cpp
  54. +59 −59 src/ActiveXCore/axstream.h
  55. +500 −500 src/ActiveXCore/axstream_impl.cpp
  56. +108 −108 src/ActiveXCore/axstream_impl.h
  57. +196 −196 src/ActiveXCore/axutil.cpp
  58. +40 −40 src/ActiveXCore/axutil.h
  59. +90 −90 src/ActiveXCore/registrymap.hpp
  60. +49 −49 src/NPAPIHost/CMakeLists.txt
  61. +161 −161 src/NPAPIHost/NpBrowserHostFuncs.cpp
  62. +137 −137 src/NPAPIHost/NpResourceHostFuncs.cpp
  63. +91 −91 src/NPAPIHost/NpapiHost.cpp
  64. +115 −115 src/NPAPIHost/NpapiHost.h
  65. +107 −107 src/NPAPIHost/NpruntimeHostFuncs.cpp
  66. +110 −110 src/NpapiCore/CMakeLists.txt
  67. +385 −385 src/NpapiCore/NPJavascriptObject.cpp
  68. +104 −104 src/NpapiCore/NPJavascriptObject.h
  69. +306 −306 src/NpapiCore/NPObjectAPI.cpp
  70. +72 −72 src/NpapiCore/NPObjectAPI.h
  71. +662 −662 src/NpapiCore/NpapiBrowserHost.cpp
  72. +144 −144 src/NpapiCore/NpapiBrowserHost.h
  73. +368 −368 src/NpapiCore/NpapiPlugin.cpp
  74. +87 −87 src/NpapiCore/NpapiPlugin.h
  75. +207 −207 src/NpapiCore/NpapiPluginModule.cpp
  76. +98 −98 src/NpapiCore/NpapiPluginModule.h
  77. +164 −164 src/NpapiCore/NpapiStream.cpp
  78. +63 −63 src/NpapiCore/NpapiStream.h
  79. +48 −48 src/NpapiCore/NpapiTypes.h
  80. +208 −208 src/PluginAuto/CMakeLists.txt
  81. +634 −634 src/PluginAuto/Mac/NpapiPluginMac.mm
  82. +59 −59 src/PluginAuto/Mac/PluginWindowMacCarbonQD.cpp
  83. +38 −38 src/PluginAuto/Mac/PluginWindowMacCarbonQD.h
  84. +103 −103 src/PluginAuto/Mac/PluginWindowMacQuickDraw.cpp
  85. +54 −54 src/PluginAuto/Mac/PluginWindowMacQuickDraw.h
  86. +72 −72 src/PluginAuto/Mac/np_macmain.cpp
  87. +114 −114 src/PluginAuto/Win/FireBreathWin.cpp
  88. +146 −146 src/PluginAuto/Win/NpapiPluginWin.cpp
  89. +216 −216 src/PluginAuto/Win/PluginWindowWin.cpp
  90. +100 −100 src/PluginAuto/Win/PluginWindowWin.h
  91. +174 −174 src/PluginAuto/Win/PluginWindowlessWin.cpp
  92. +92 −92 src/PluginAuto/Win/PluginWindowlessWin.h
  93. +126 −126 src/PluginAuto/X11/NpapiPluginX11.cpp
  94. +255 −255 src/PluginAuto/X11/PluginWindowX11.cpp
  95. +82 −82 src/PluginAuto/X11/PluginWindowX11.h
  96. +55 −55 src/PluginAuto/X11/np_x11main.cpp
  97. +122 −122 src/PluginAuto/log4cplus/log4cplus.cpp
  98. +26 −26 src/PluginAuto/null/NullLogger.cpp
  99. +33 −33 src/PluginCore/BrowserPlugin.cpp
  100. +55 −55 src/PluginCore/BrowserPlugin.h
  101. +159 −159 src/PluginCore/BrowserStream.cpp
  102. +274 −274 src/PluginCore/BrowserStream.h
  103. +59 −59 src/PluginCore/BrowserStreamManager.cpp
  104. +49 −49 src/PluginCore/BrowserStreamManager.h
  105. +93 −93 src/PluginCore/CMakeLists.txt
  106. +80 −80 src/PluginCore/DefaultBrowserStreamHandler.cpp
  107. +150 −150 src/PluginCore/DefaultBrowserStreamHandler.h
  108. +165 −165 src/PluginCore/PluginCore.cpp
  109. +80 −80 src/PluginCore/PluginEvent.h
  110. +146 −146 src/PluginCore/PluginEventSink.h
  111. +142 −142 src/PluginCore/PluginEventSource.h
  112. +43 −43 src/PluginCore/PluginEvents/AttachedEvent.h
  113. +69 −69 src/PluginCore/PluginEvents/DrawingEvents.h
  114. +41 −41 src/PluginCore/PluginEvents/GeneralEvents.h
  115. +119 −119 src/PluginCore/PluginEvents/KeyCodes.h
  116. +66 −66 src/PluginCore/PluginEvents/KeyboardEvents.h
  117. +47 −47 src/PluginCore/PluginEvents/MacEventCarbon.h
  118. +67 −67 src/PluginCore/PluginEvents/MacEventCocoa.h
  119. +83 −83 src/PluginCore/PluginEvents/MouseEvents.h
  120. +159 −159 src/PluginCore/PluginEvents/StreamEvents.h
  121. +51 −51 src/PluginCore/PluginEvents/WindowsEvent.h
  122. +45 −45 src/PluginCore/PluginEvents/X11Event.h
  123. +19 −19 src/PluginCore/PluginWindow.cpp
  124. +84 −84 src/PluginCore/PluginWindow.h
  125. +182 −182 src/PluginCore/SimpleStreamHelper.cpp
  126. +174 −174 src/PluginCore/SimpleStreamHelper.h
  127. +104 −104 src/PluginCore/Win/KeyCodesWin.cpp
  128. +30 −30 src/PluginCore/Win/KeyCodesWin.h
  129. +24 −24 src/ScriptingCore/BrowserHostWrapper.h
  130. +51 −51 src/ScriptingCore/CrossThreadCall.cpp
  131. +220 −220 src/ScriptingCore/CrossThreadCall.h
Sorry, we could not display the entire diff because it was too big.
View
186 CMakeLists.txt
@@ -1,93 +1,93 @@
-#/**********************************************************\
-#Original Author: Richard Bateman (taxilian)
-#
-#Created: Nov 20, 2009
-#License: Dual license model; choose one of two:
-# New BSD License
-# http://www.opensource.org/licenses/bsd-license.php
-# - or -
-# GNU Lesser General Public License, version 2.1
-# http://www.gnu.org/licenses/lgpl-2.1.html
-#
-#Copyright 2009 PacketPass, Inc and the Firebreath development team
-#\**********************************************************/
-
-# Written to work with cmake 2.6
-cmake_minimum_required (VERSION 2.6)
-set (CMAKE_BACKWARDS_COMPATIBILITY 2.6)
-
-Project (FireBreath)
-
-set(CMAKE_DIR ${CMAKE_SOURCE_DIR}/cmake)
-
-include(${CMAKE_DIR}/common.cmake)
-
-#check to make sure we're either using WITH_SYSTEM_BOOST or have the firebreath-boost lib installed
-check_boost()
-
-if (APPLE)
- clear_xcode_patches()
-endif()
-
-if (NOT EXISTS ${PROJECTS_SOURCE_DIR})
- message(FATAL_ERROR "The specified project directory ${PROJECTS_SOURCE_DIR} is not found")
-endif()
-
-if (VERBOSE)
- message("Firebreath solution dir: " ${PROJECT_BINARY_DIR})
-endif()
-
-find_package(Threads REQUIRED)
-add_boost_library(thread)
-add_boost_library(system)
-if (WITH_SYSTEM_BOOST)
- add_boost_library(date_time)
-endif()
-
-# Common core projects -- projects that don't have any plugin specific code,
-# but are required before any plugins are loaded
-add_subdirectory(${SCRIPTINGCORE_SOURCE_DIR})
-add_subdirectory(${PLUGINCORE_SOURCE_DIR})
-add_subdirectory(${NPAPICORE_SOURCE_DIR})
-if (WIN32)
- add_subdirectory(${ACTIVEXCORE_SOURCE_DIR})
-endif()
-
-# search the project src dir for plugin project directories
-file (GLOB PLUGIN_PROJECTS
- ${PROJECTS_SOURCE_DIR}/[^.]*
- )
-
-if (VERBOSE)
- message("Searching ${PROJECTS_SOURCE_DIR}/*: found ${PLUGIN_PROJECTS}")
-endif()
-
-# loop through the found directories and add any with a CMakeLists.txt and a PluginConfig.cmake
-# as a subproject
-foreach (CURPROJECT ${PLUGIN_PROJECTS})
- if (EXISTS "${CURPROJECT}/CMakeLists.txt" AND EXISTS "${CURPROJECT}/PluginConfig.cmake")
- set (FOUND_PROJECTS 1)
- get_filename_component(PROJNAME ${CURPROJECT} NAME_WE)
- configure_file(${CMAKE_DIR}/projectConfig_main.cmake.in ${PROJECTS_BINARY_DIR}/${PROJNAME}/projectConfig.cmake COPYONLY)
- if (VERBOSE)
- message("Configuring plugin project ${CURPROJECT} in ${PROJECTS_BINARY_DIR}/${PROJNAME}")
- endif()
- add_subdirectory("${CURPROJECT}" "${PROJECTS_BINARY_DIR}/${PROJNAME}")
- else()
- message("${CURPROJECT}/ does not seem to be a FireBreath Plugin")
- endif()
-endforeach()
-
-# Common projects -- projects that don't have any plugin specific code
-add_subdirectory(${UNITTEST_FW_SOURCE_DIR})
-add_subdirectory(${NPAPIHOST_SOURCE_DIR})
-add_subdirectory(${SCRIPTINGCORETEST_SOURCE_DIR})
-if (WIN32)
- add_subdirectory(${ACTIVEXCORETEST_SOURCE_DIR})
-endif()
-#add_subdirectory(${NPAPICORETEST_SOURCE_DIR}) # - not functional, needs to be re-done
-
-if (NOT FOUND_PROJECTS)
- MESSAGE("No projects found in ${PROJECTS_SOURCE_DIR}/.")
- MESSAGE(FATAL_ERROR "To build examples, run 'prep<ver> examples'")
-endif()
+#/**********************************************************\
+#Original Author: Richard Bateman (taxilian)
+#
+#Created: Nov 20, 2009
+#License: Dual license model; choose one of two:
+# New BSD License
+# http://www.opensource.org/licenses/bsd-license.php
+# - or -
+# GNU Lesser General Public License, version 2.1
+# http://www.gnu.org/licenses/lgpl-2.1.html
+#
+#Copyright 2009 PacketPass, Inc and the Firebreath development team
+#\**********************************************************/
+
+# Written to work with cmake 2.6
+cmake_minimum_required (VERSION 2.6)
+set (CMAKE_BACKWARDS_COMPATIBILITY 2.6)
+
+Project (FireBreath)
+
+set(CMAKE_DIR ${CMAKE_SOURCE_DIR}/cmake)
+
+include(${CMAKE_DIR}/common.cmake)
+
+#check to make sure we're either using WITH_SYSTEM_BOOST or have the firebreath-boost lib installed
+check_boost()
+
+if (APPLE)
+ clear_xcode_patches()
+endif()
+
+if (NOT EXISTS ${PROJECTS_SOURCE_DIR})
+ message(FATAL_ERROR "The specified project directory ${PROJECTS_SOURCE_DIR} is not found")
+endif()
+
+if (VERBOSE)
+ message("Firebreath solution dir: " ${PROJECT_BINARY_DIR})
+endif()
+
+find_package(Threads REQUIRED)
+add_boost_library(thread)
+add_boost_library(system)
+if (WITH_SYSTEM_BOOST)
+ add_boost_library(date_time)
+endif()
+
+# Common core projects -- projects that don't have any plugin specific code,
+# but are required before any plugins are loaded
+add_subdirectory(${SCRIPTINGCORE_SOURCE_DIR})
+add_subdirectory(${PLUGINCORE_SOURCE_DIR})
+add_subdirectory(${NPAPICORE_SOURCE_DIR})
+if (WIN32)
+ add_subdirectory(${ACTIVEXCORE_SOURCE_DIR})
+endif()
+
+# search the project src dir for plugin project directories
+file (GLOB PLUGIN_PROJECTS
+ ${PROJECTS_SOURCE_DIR}/[^.]*
+ )
+
+if (VERBOSE)
+ message("Searching ${PROJECTS_SOURCE_DIR}/*: found ${PLUGIN_PROJECTS}")
+endif()
+
+# loop through the found directories and add any with a CMakeLists.txt and a PluginConfig.cmake
+# as a subproject
+foreach (CURPROJECT ${PLUGIN_PROJECTS})
+ if (EXISTS "${CURPROJECT}/CMakeLists.txt" AND EXISTS "${CURPROJECT}/PluginConfig.cmake")
+ set (FOUND_PROJECTS 1)
+ get_filename_component(PROJNAME ${CURPROJECT} NAME_WE)
+ configure_file(${CMAKE_DIR}/projectConfig_main.cmake.in ${PROJECTS_BINARY_DIR}/${PROJNAME}/projectConfig.cmake COPYONLY)
+ if (VERBOSE)
+ message("Configuring plugin project ${CURPROJECT} in ${PROJECTS_BINARY_DIR}/${PROJNAME}")
+ endif()
+ add_subdirectory("${CURPROJECT}" "${PROJECTS_BINARY_DIR}/${PROJNAME}")
+ else()
+ message("${CURPROJECT}/ does not seem to be a FireBreath Plugin")
+ endif()
+endforeach()
+
+# Common projects -- projects that don't have any plugin specific code
+add_subdirectory(${UNITTEST_FW_SOURCE_DIR})
+add_subdirectory(${NPAPIHOST_SOURCE_DIR})
+add_subdirectory(${SCRIPTINGCORETEST_SOURCE_DIR})
+if (WIN32)
+ add_subdirectory(${ACTIVEXCORETEST_SOURCE_DIR})
+endif()
+#add_subdirectory(${NPAPICORETEST_SOURCE_DIR}) # - not functional, needs to be re-done
+
+if (NOT FOUND_PROJECTS)
+ MESSAGE("No projects found in ${PROJECTS_SOURCE_DIR}/.")
+ MESSAGE(FATAL_ERROR "To build examples, run 'prep<ver> examples'")
+endif()
View
3,312 Doxyfile
1,656 additions, 1,656 deletions not shown
View
132 cmake/FixFragment.xslt
@@ -1,66 +1,66 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns:fn="http://www.w3.org/2005/xpath-functions"
- xmlns:w="http://schemas.microsoft.com/wix/2006/wi">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
-
- <!-- Identity template -->
- <xsl:template match="@* | node()">
- <xsl:copy>
- <xsl:apply-templates select="@* | node()" />
- </xsl:copy>
- </xsl:template>
-
- <xsl:template match="/w:Wix" >
- <w:Wix>
- <xsl:apply-templates select="w:Fragment" />
- </w:Wix>
- </xsl:template>
-
- <xsl:template match="w:Fragment" >
- <w:Fragment>
- <xsl:apply-templates select="w:DirectoryRef" />
- <xsl:apply-templates select="w:ComponentGroup"/>
- </w:Fragment>
- </xsl:template>
-
- <xsl:template match="/w:Wix/w:Fragment/w:DirectoryRef">
- <w:DirectoryRef Id="{@Id}" />
- </xsl:template>
-
- <xsl:template match="w:Component">
- <w:Component Id="{@Id}" Guid="{@Guid}" Directory="{@Directory}">
- <xsl:apply-templates select="w:File" />
- <xsl:apply-templates select="w:RegistryValue" />
- </w:Component>
- </xsl:template>
-
- <xsl:template match="w:File">
- <w:File Id="{@Id}" Source="{@Source}" />
- </xsl:template>
-
- <xsl:template match="w:RegistryValue">
- <w:RegistryValue Root="{@Root}" Key="{@Key}" Value="{@Value}" Type="{@Type}" Action="{@Action}">
- <xsl:if test="@Name != ''"> <xsl:attribute name="Name"> <xsl:value-of select="@Name" /> </xsl:attribute> </xsl:if>
- <xsl:if test="@Id != ''"> <xsl:attribute name="Id"> <xsl:value-of select="@Id" /> </xsl:attribute> </xsl:if>
- <xsl:if test="position() = 1">
- <xsl:attribute name="KeyPath">yes</xsl:attribute>
- </xsl:if>
- </w:RegistryValue>
- </xsl:template>
-
- <xsl:template match="w:ComponentGroup">
- <w:ComponentGroup Id="{@Id}">
- <xsl:apply-templates select="w:Component"/>
- <!-- Intersection in XSLT 1.0 (Michael Kay) -->
- </w:ComponentGroup>
- </xsl:template>
-
- <xsl:template match="w:ComponentRef">
- <w:ComponentRef Id="{@Id}"/>
- </xsl:template>
-
-</xsl:stylesheet>
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:fn="http://www.w3.org/2005/xpath-functions"
+ xmlns:w="http://schemas.microsoft.com/wix/2006/wi">
+
+ <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
+
+ <!-- Identity template -->
+ <xsl:template match="@* | node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@* | node()" />
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="/w:Wix" >
+ <w:Wix>
+ <xsl:apply-templates select="w:Fragment" />
+ </w:Wix>
+ </xsl:template>
+
+ <xsl:template match="w:Fragment" >
+ <w:Fragment>
+ <xsl:apply-templates select="w:DirectoryRef" />
+ <xsl:apply-templates select="w:ComponentGroup"/>
+ </w:Fragment>
+ </xsl:template>
+
+ <xsl:template match="/w:Wix/w:Fragment/w:DirectoryRef">
+ <w:DirectoryRef Id="{@Id}" />
+ </xsl:template>
+
+ <xsl:template match="w:Component">
+ <w:Component Id="{@Id}" Guid="{@Guid}" Directory="{@Directory}">
+ <xsl:apply-templates select="w:File" />
+ <xsl:apply-templates select="w:RegistryValue" />
+ </w:Component>
+ </xsl:template>
+
+ <xsl:template match="w:File">
+ <w:File Id="{@Id}" Source="{@Source}" />
+ </xsl:template>
+
+ <xsl:template match="w:RegistryValue">
+ <w:RegistryValue Root="{@Root}" Key="{@Key}" Value="{@Value}" Type="{@Type}" Action="{@Action}">
+ <xsl:if test="@Name != ''"> <xsl:attribute name="Name"> <xsl:value-of select="@Name" /> </xsl:attribute> </xsl:if>
+ <xsl:if test="@Id != ''"> <xsl:attribute name="Id"> <xsl:value-of select="@Id" /> </xsl:attribute> </xsl:if>
+ <xsl:if test="position() = 1">
+ <xsl:attribute name="KeyPath">yes</xsl:attribute>
+ </xsl:if>
+ </w:RegistryValue>
+ </xsl:template>
+
+ <xsl:template match="w:ComponentGroup">
+ <w:ComponentGroup Id="{@Id}">
+ <xsl:apply-templates select="w:Component"/>
+ <!-- Intersection in XSLT 1.0 (Michael Kay) -->
+ </w:ComponentGroup>
+ </xsl:template>
+
+ <xsl:template match="w:ComponentRef">
+ <w:ComponentRef Id="{@Id}"/>
+ </xsl:template>
+
+</xsl:stylesheet>
View
170 cmake/buildconfig.cmake
@@ -1,85 +1,85 @@
-#/**********************************************************\
-#Original Author: Richard Bateman (taxilian)
-#
-#Created: Nov 20, 2009
-#License: Dual license model; choose one of two:
-# New BSD License
-# http://www.opensource.org/licenses/bsd-license.php
-# - or -
-# GNU Lesser General Public License, version 2.1
-# http://www.gnu.org/licenses/lgpl-2.1.html
-#
-#Copyright 2009-2010 PacketPass, Inc and the Firebreath development team
-#\**********************************************************/
-
-
-if (WIN32)
- set(CMAKE_C_FLAGS "/DWIN32 /DFB_WIN=1 /DXP_WIN=1 /W3 /wd4996 /nologo /D UNICODE /D _UNICODE /D _WINDOWS")
- if (NOT WITH_SYSTEM_BOOST)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D BOOST_ALL_NO_LIB=1")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D BOOST_ALL_NO_LIB=1")
- endif()
- set(CMAKE_CXX_FLAGS "/DWIN32 /DFB_WIN=1 /DXP_WIN=1 /W3 /wd4996 /nologo /EHsc /wd4290 /D UNICODE /D _UNICODE /D _WINDOWS")
- set(CMAKE_C_FLAGS_RELEASE "/MT /Ox /DNDEBUG")
- set(CMAKE_CXX_FLAGS_RELEASE "/MT /Ox /DNDEBUG")
- set(CMAKE_C_FLAGS_DEBUG "/MTd /Od /DDEBUG /D_DEBUG /ZI /RTC1 /Gm")
- set(CMAKE_CXX_FLAGS_DEBUG "/MTd /Od /DDEBUG /D_DEBUG /ZI /RTC1 /Gm")
- set(CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /DNDEBUG")
- set(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /DNDEBUG")
- set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MTd /Ox /DNDEBUG /Zi")
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Ox /DNDEBUG /Zi")
- set(CMAKE_EXE_LINKER_FLAGS_DEBUG
- "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ")
- set(CMAKE_EXE_LINKER_FLAGS_RELEASE
- "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ")
- set(CMAKE_SHARED_LINKER_FLAGS_DEBUG
- "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /SUBSYSTEM:WINDOWS")
- set(CMAKE_SHARED_LINKER_FLAGS_RELEASE
- "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF")
-
- set(LINK_FLAGS "/LIBPATH:\"${ATL_LIBRARY_DIR}\"")
-
- if (WITH_DYNAMIC_MSVC_RUNTIME)
- message(STATUS "Building with dynamic MSVC runtime")
- foreach(flag_var
- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
- if(${flag_var} MATCHES "/MT")
- string(REGEX REPLACE "/MT" "/MD" ${flag_var} "${${flag_var}}")
- endif()
- endforeach(flag_var)
- endif()
-endif()
-
-# We define preprocessor flags here in addition to other flags
-# because it is the most convenient place to put them to apply
-# to all targets
-if(UNIX)
- # XP_UNIX is used by the Gecko SDK
- set(gecko_defs "-DXP_UNIX")
- if(APPLE)
- # In addition, Gecko SDK on Mac OS X needs XP_MACOSX
- set(gecko_defs "${gecko_defs} -DXP_MACOSX")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFB_MACOSX=1")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFB_MACOSX=1")
- endif()
-
- if(NOT APPLE)
- # On 64 bit, -fPIC is required for compiling all objects which get linked
- # into a .so file.
- # CMake correctly defaults to -fPIC for shared libs, but static libs are
- # built without. Since we are linking static libs later into a shared lib
- # (as opposed to an executable), we need to build static libs with -fPIC
- # too.
- set(fPIC_flag "-fPIC")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFB_X11=1")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFB_X11=1")
- endif()
-
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${gecko_defs} ${fPIC_flag}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${gecko_defs} ${fPIC_flag}")
- if (NOT WITH_SYSTEM_BOOST)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBOOST_ALL_NO_LIB=1")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_ALL_NO_LIB=1")
- endif()
-endif()
+#/**********************************************************\
+#Original Author: Richard Bateman (taxilian)
+#
+#Created: Nov 20, 2009
+#License: Dual license model; choose one of two:
+# New BSD License
+# http://www.opensource.org/licenses/bsd-license.php
+# - or -
+# GNU Lesser General Public License, version 2.1
+# http://www.gnu.org/licenses/lgpl-2.1.html
+#
+#Copyright 2009-2010 PacketPass, Inc and the Firebreath development team
+#\**********************************************************/
+
+
+if (WIN32)
+ set(CMAKE_C_FLAGS "/DWIN32 /DFB_WIN=1 /DXP_WIN=1 /W3 /wd4996 /nologo /D UNICODE /D _UNICODE /D _WINDOWS")
+ if (NOT WITH_SYSTEM_BOOST)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D BOOST_ALL_NO_LIB=1")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D BOOST_ALL_NO_LIB=1")
+ endif()
+ set(CMAKE_CXX_FLAGS "/DWIN32 /DFB_WIN=1 /DXP_WIN=1 /W3 /wd4996 /nologo /EHsc /wd4290 /D UNICODE /D _UNICODE /D _WINDOWS")
+ set(CMAKE_C_FLAGS_RELEASE "/MT /Ox /DNDEBUG")
+ set(CMAKE_CXX_FLAGS_RELEASE "/MT /Ox /DNDEBUG")
+ set(CMAKE_C_FLAGS_DEBUG "/MTd /Od /DDEBUG /D_DEBUG /ZI /RTC1 /Gm")
+ set(CMAKE_CXX_FLAGS_DEBUG "/MTd /Od /DDEBUG /D_DEBUG /ZI /RTC1 /Gm")
+ set(CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /DNDEBUG")
+ set(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O1 /DNDEBUG")
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MTd /Ox /DNDEBUG /Zi")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Ox /DNDEBUG /Zi")
+ set(CMAKE_EXE_LINKER_FLAGS_DEBUG
+ "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ")
+ set(CMAKE_EXE_LINKER_FLAGS_RELEASE
+ "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ")
+ set(CMAKE_SHARED_LINKER_FLAGS_DEBUG
+ "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /SUBSYSTEM:WINDOWS")
+ set(CMAKE_SHARED_LINKER_FLAGS_RELEASE
+ "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF")
+
+ set(LINK_FLAGS "/LIBPATH:\"${ATL_LIBRARY_DIR}\"")
+
+ if (WITH_DYNAMIC_MSVC_RUNTIME)
+ message(STATUS "Building with dynamic MSVC runtime")
+ foreach(flag_var
+ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+ if(${flag_var} MATCHES "/MT")
+ string(REGEX REPLACE "/MT" "/MD" ${flag_var} "${${flag_var}}")
+ endif()
+ endforeach(flag_var)
+ endif()
+endif()
+
+# We define preprocessor flags here in addition to other flags
+# because it is the most convenient place to put them to apply
+# to all targets
+if(UNIX)
+ # XP_UNIX is used by the Gecko SDK
+ set(gecko_defs "-DXP_UNIX")
+ if(APPLE)
+ # In addition, Gecko SDK on Mac OS X needs XP_MACOSX
+ set(gecko_defs "${gecko_defs} -DXP_MACOSX")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFB_MACOSX=1")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFB_MACOSX=1")
+ endif()
+
+ if(NOT APPLE)
+ # On 64 bit, -fPIC is required for compiling all objects which get linked
+ # into a .so file.
+ # CMake correctly defaults to -fPIC for shared libs, but static libs are
+ # built without. Since we are linking static libs later into a shared lib
+ # (as opposed to an executable), we need to build static libs with -fPIC
+ # too.
+ set(fPIC_flag "-fPIC")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DFB_X11=1")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFB_X11=1")
+ endif()
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${gecko_defs} ${fPIC_flag}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${gecko_defs} ${fPIC_flag}")
+ if (NOT WITH_SYSTEM_BOOST)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBOOST_ALL_NO_LIB=1")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_ALL_NO_LIB=1")
+ endif()
+endif()
View
512 cmake/common.cmake
@@ -1,256 +1,256 @@
-#/**********************************************************\
-#Original Author: Richard Bateman (taxilian)
-#
-#Created: Nov 20, 2009
-#License: Dual license model; choose one of two:
-# New BSD License
-# http://www.opensource.org/licenses/bsd-license.php
-# - or -
-# GNU Lesser General Public License, version 2.1
-# http://www.gnu.org/licenses/lgpl-2.1.html
-#
-#Copyright 2009 PacketPass, Inc and the Firebreath development team
-#\**********************************************************/
-
-get_filename_component (FB_ROOT_DIR "${CMAKE_DIR}/.." ABSOLUTE)
-get_filename_component (SOURCE_DIR "${CMAKE_DIR}/../src" ABSOLUTE)
-get_filename_component (TEST_DIR "${CMAKE_DIR}/../tests" ABSOLUTE)
-
-set (BIN_DIR "${CMAKE_BINARY_DIR}/bin")
-set (FIREBREATH YES INTERNAL)
-
-if (WIN32)
- set (PLATFORM_NAME "Win")
- include(${CMAKE_DIR}/Win.cmake)
- include(${CMAKE_DIR}/wix.cmake)
-elseif(APPLE)
- set (PLATFORM_NAME "Mac")
- include(${CMAKE_DIR}/Mac.cmake)
-elseif(UNIX)
- set (PLATFORM_NAME "X11")
- include(${CMAKE_DIR}/X11.cmake)
-endif()
-
-# include file with the crazy configure_template function
-include(${CMAKE_DIR}/configure_template.cmake)
-
-# include file with build options
-include(${CMAKE_DIR}/options.cmake)
-
-# Get the project paths
-include(${CMAKE_DIR}/paths.cmake)
-
-# include the build configuration
-include(${CMAKE_DIR}/buildconfig.cmake)
-
-if (NOT GEN_DIR)
- get_filename_component (GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/../gen" ABSOLUTE)
-endif()
-
-if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/PluginConfig.cmake)
- include(${CMAKE_DIR}/PluginConfigDefaults.cmake)
- include (${CMAKE_CURRENT_SOURCE_DIR}/PluginConfig.cmake)
-endif()
-
-macro (browserplugin_project PLUGIN_NAME)
-
- Project (${PLUGIN_NAME})
- message ("Generating project ${PROJECT_NAME} in ${CMAKE_CURRENT_BINARY_DIR}")
-
- if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PLATFORM_NAME}/projectDef.cmake)
- set(CMAKE_CURRENT_PLUGIN_DIR ${CMAKE_CURRENT_SOURCE_DIR})
- include(${CMAKE_CURRENT_BINARY_DIR}/projectConfig.cmake)
- include(${FB_ROOT_DIR}/pluginProjects.cmake)
- endif()
-
-endmacro(browserplugin_project)
-
-macro (include_platform)
-
- if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PLATFORM_NAME}/projectDef.cmake)
- include(${CMAKE_CURRENT_SOURCE_DIR}/${PLATFORM_NAME}/projectDef.cmake)
- else()
- message ("Could not find a ${PLATFORM_NAME} directory for the current project")
- endif()
-
-endmacro(include_platform)
-
-macro (link_boost_library PROJECT BOOST_LIB)
- add_boost_library(${BOOST_LIB})
- if (NOT WITH_SYSTEM_BOOST)
- target_link_libraries(${PROJECT} boost_${BOOST_LIB})
- endif()
-endmacro(link_boost_library)
-
-macro (add_boost_library BOOST_LIB)
-
- if (WITH_SYSTEM_BOOST)
- find_package(Boost COMPONENTS ${BOOST_LIB} REQUIRED)
- else()
- list(APPEND Boost_INCLUDE_DIRS ${BOOST_SOURCE_DIR})
- list(REMOVE_DUPLICATES Boost_INCLUDE_DIRS)
-
- list(APPEND Boost_LIBRARIES boost_${BOOST_LIB})
- list(REMOVE_DUPLICATES Boost_LIBRARIES)
- if (NOT TARGET boost_${BOOST_LIB})
- add_subdirectory(${BOOST_SOURCE_DIR}/libs/${BOOST_LIB} ${CMAKE_BINARY_DIR}/boost/libs/${BOOST_LIB})
- endif()
- endif()
-
-endmacro (add_boost_library)
-
-macro (add_firebreath_library_dir dir)
- list(APPEND FBLIB_DIRS ${dir})
- list(REMOVE_DUPLICATES FBLIB_DIRS)
-endmacro()
-
-macro (add_firebreath_library project_name)
-
- foreach(LIB_DIR ${FBLIB_DIRS})
- if (EXISTS ${LIB_DIR}/${project_name}/CMakeLists.txt)
- get_target_property(library_target_exists ${project_name} TYPE)
- if (NOT library_target_exists)
- set(FBLIB_DEFINITIONS)
- add_subdirectory(${LIB_DIR}/${project_name} ${CMAKE_CURRENT_BINARY_DIR}/fblibs/${project_name})
- if (FBLIB_DEFINITIONS)
- add_definitions(${FBLIB_DEFINITIONS})
- endif()
- endif()
- endif()
- endforeach()
- set (LIB_KEY ${PLUGIN_NAME}_${project_name})
- set (${LIB_KEY} YES)
- set (${LIB_KEY} YES PARENT_SCOPE)
- message("Set ${LIB_KEY} to ${${LIB_KEY}}")
-
-endmacro(add_firebreath_library)
-
-macro (append_firebreath_link_library name)
- list(APPEND FBLIB_LIBRARIES ${name})
- list(REMOVE_DUPLICATES FBLIB_LIBRARIES)
-endmacro(append_firebreath_link_library)
-
-macro (append_firebreath_include_dir dir)
- list(APPEND FBLIB_INCLUDE_DIRS ${dir})
- list(REMOVE_DUPLICATES FBLIB_INCLUDE_DIRS)
-endmacro(append_firebreath_include_dir)
-
-macro (add_firebreath_definition DEFS)
- list(APPEND FBLIB_DEFINITIONS ${DEFS})
- add_definitions(${DEFS})
-endmacro()
-
-macro (export_project_dependencies)
- if (FBLIB_LIBRARIES)
- list(REMOVE_DUPLICATES FBLIB_LIBRARIES)
- endif()
- if (FBLIB_INCLUDE_DIRS)
- list(REMOVE_DUPLICATES FBLIB_INCLUDE_DIRS)
- endif()
- set (FBLIB_LIBRARIES ${FBLIB_LIBRARIES} PARENT_SCOPE)
- set (FBLIB_INCLUDE_DIRS ${FBLIB_INCLUDE_DIRS} PARENT_SCOPE)
- set (FBLIB_DEFINITIONS ${FBLIB_DEFINITIONS} PARENT_SCOPE)
- set (Boost_LIBRARIES ${Boost_LIBRARIES} PARENT_SCOPE)
- set (Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} PARENT_SCOPE)
-endmacro (export_project_dependencies)
-
-function (check_boost)
- if (NOT WITH_SYSTEM_BOOST)
- if (NOT EXISTS ${BOOST_SOURCE_DIR})
- file(MAKE_DIRECTORY ${BOOST_SOURCE_DIR})
- endif()
- if (NOT EXISTS ${BOOST_SOURCE_DIR}/boost/)
- set (FB_URL "https://github.com/firebreath/firebreath-boost/tarball/master")
- message("Boost not found; downloading latest FireBreath-boost from GitHub (http://github.com/firebreath/firebreath-boost)")
- find_program(GIT git NO_DEFAULT_PATHS)
- if (EXISTS ${FB_ROOT_DIR}/.git AND NOT ${GIT} MATCHES "GIT-NOTFOUND")
- message("Using git")
- if (${GIT} MATCHES "GIT-NOTFOUND")
- message(FATAL_ERROR "Can't find git in the path. Please run 'git submodule update --init --recursive' to get firebreath-boost.")
- endif()
- execute_process(
- COMMAND ${GIT}
- submodule update --recursive --init
- WORKING_DIRECTORY "${FB_ROOT_DIR}")
- else()
- message("Downloading...")
- find_program(CURL curl)
- find_program(WGET wget PATHS "${CMAKE_DIR}/")
- if (NOT ${WGET} MATCHES "WGET-NOTFOUND")
- execute_process(
- COMMAND ${WGET}
- --no-check-certificate
- -O "${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz"
- "${FB_URL}"
- )
- elseif (NOT ${CURL} MATCHES "CURL-NOTFOUND")
- execute_process(
- COMMAND ${CURL}
- -L "${FB_URL}"
- -k
- OUTPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz"
- )
- else()
- file (DOWNLOAD "${FB_URL}" "${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz" STATUS DL_STATUS SHOW_PROGRESS)
- message("Result: ${DL_STATUS}")
- endif()
- if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz")
- message("Error downloading firebreath-boost. Please get firebreath-boost from ")
- message("http://github.com/firebreath/firebreath-boost and install it into")
- message("the src/3rdParty/boost directory. When properly installed, you should have:")
- message(" src/3rdParty/boost/boost/")
- message(" src/3rdParty/boost/libs/")
- message(FATAL_ERROR "firebreath-boost could not be installed. Please install manually.")
- endif()
- find_program(TAR tar NO_DEFAULT_PATHS)
- find_program(GZIP gzip NO_DEFAULT_PATHS)
- if (WIN32)
- message("Using 7-zip to extract the archive")
- find_program(SEVZIP 7za PATHS "${CMAKE_DIR}/")
- execute_process(
- COMMAND ${SEVZIP}
- e "${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz"
- WORKING_DIRECTORY "${BOOST_SOURCE_DIR}"
- OUTPUT_QUIET
- )
- file (GLOB TAR_FILE
- ${BOOST_SOURCE_DIR}/*.tar
- )
- execute_process(
- COMMAND ${SEVZIP}
- x "${TAR_FILE}"
- WORKING_DIRECTORY "${BOOST_SOURCE_DIR}"
- OUTPUT_QUIET
- )
- file(REMOVE ${TAR_FILE})
- elseif (NOT ${TAR} MATCHES "TAR-NOTFOUND" AND NOT ${GZIP} MATCHES "GZIP-NOTFOUND")
- message("Using tar xzf to extract the archive")
- execute_process(
- COMMAND ${TAR}
- xzf "${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz"
- WORKING_DIRECTORY "${BOOST_SOURCE_DIR}"
- OUTPUT_QUIET
- )
- else()
- message("Please extract ${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz and ")
- message("move the boost/ and libs/ subdirectories ")
- message("to ${BOOST_SOURCE_DIR}/boost and ${BOOST_SOURCE_DIR}/libs")
- message(FATAL_ERROR "Firebreath-boost not installed! (follow above directions to resolve)")
- endif()
- #file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz)
- message("Installing firebreath-boost...")
- file (GLOB _BOOST_FILES
- ${BOOST_SOURCE_DIR}/firebreath-firebreath-boost*/*)
- foreach (_CUR_FILE ${_BOOST_FILES})
- get_filename_component (_CUR_FILENAME ${_CUR_FILE} NAME)
- file(RENAME ${_CUR_FILE} ${BOOST_SOURCE_DIR}/${_CUR_FILENAME})
- endforeach()
- message("Cleaning up firebreath-boost temp install files...")
- file (GLOB _BOOST_TMPFILES
- ${BOOST_SOURCE_DIR}/firebreath*
- ${BOOST_SOURCE_DIR}/pax*)
- file (REMOVE_RECURSE ${_BOOST_TMPFILES})
- endif()
- endif()
- endif()
-endfunction()
+#/**********************************************************\
+#Original Author: Richard Bateman (taxilian)
+#
+#Created: Nov 20, 2009
+#License: Dual license model; choose one of two:
+# New BSD License
+# http://www.opensource.org/licenses/bsd-license.php
+# - or -
+# GNU Lesser General Public License, version 2.1
+# http://www.gnu.org/licenses/lgpl-2.1.html
+#
+#Copyright 2009 PacketPass, Inc and the Firebreath development team
+#\**********************************************************/
+
+get_filename_component (FB_ROOT_DIR "${CMAKE_DIR}/.." ABSOLUTE)
+get_filename_component (SOURCE_DIR "${CMAKE_DIR}/../src" ABSOLUTE)
+get_filename_component (TEST_DIR "${CMAKE_DIR}/../tests" ABSOLUTE)
+
+set (BIN_DIR "${CMAKE_BINARY_DIR}/bin")
+set (FIREBREATH YES INTERNAL)
+
+if (WIN32)
+ set (PLATFORM_NAME "Win")
+ include(${CMAKE_DIR}/Win.cmake)
+ include(${CMAKE_DIR}/wix.cmake)
+elseif(APPLE)
+ set (PLATFORM_NAME "Mac")
+ include(${CMAKE_DIR}/Mac.cmake)
+elseif(UNIX)
+ set (PLATFORM_NAME "X11")
+ include(${CMAKE_DIR}/X11.cmake)
+endif()
+
+# include file with the crazy configure_template function
+include(${CMAKE_DIR}/configure_template.cmake)
+
+# include file with build options
+include(${CMAKE_DIR}/options.cmake)
+
+# Get the project paths
+include(${CMAKE_DIR}/paths.cmake)
+
+# include the build configuration
+include(${CMAKE_DIR}/buildconfig.cmake)
+
+if (NOT GEN_DIR)
+ get_filename_component (GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/../gen" ABSOLUTE)
+endif()
+
+if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/PluginConfig.cmake)
+ include(${CMAKE_DIR}/PluginConfigDefaults.cmake)
+ include (${CMAKE_CURRENT_SOURCE_DIR}/PluginConfig.cmake)
+endif()
+
+macro (browserplugin_project PLUGIN_NAME)
+
+ Project (${PLUGIN_NAME})
+ message ("Generating project ${PROJECT_NAME} in ${CMAKE_CURRENT_BINARY_DIR}")
+
+ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PLATFORM_NAME}/projectDef.cmake)
+ set(CMAKE_CURRENT_PLUGIN_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+ include(${CMAKE_CURRENT_BINARY_DIR}/projectConfig.cmake)
+ include(${FB_ROOT_DIR}/pluginProjects.cmake)
+ endif()
+
+endmacro(browserplugin_project)
+
+macro (include_platform)
+
+ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${PLATFORM_NAME}/projectDef.cmake)
+ include(${CMAKE_CURRENT_SOURCE_DIR}/${PLATFORM_NAME}/projectDef.cmake)
+ else()
+ message ("Could not find a ${PLATFORM_NAME} directory for the current project")
+ endif()
+
+endmacro(include_platform)
+
+macro (link_boost_library PROJECT BOOST_LIB)
+ add_boost_library(${BOOST_LIB})
+ if (NOT WITH_SYSTEM_BOOST)
+ target_link_libraries(${PROJECT} boost_${BOOST_LIB})
+ endif()
+endmacro(link_boost_library)
+
+macro (add_boost_library BOOST_LIB)
+
+ if (WITH_SYSTEM_BOOST)
+ find_package(Boost COMPONENTS ${BOOST_LIB} REQUIRED)
+ else()
+ list(APPEND Boost_INCLUDE_DIRS ${BOOST_SOURCE_DIR})
+ list(REMOVE_DUPLICATES Boost_INCLUDE_DIRS)
+
+ list(APPEND Boost_LIBRARIES boost_${BOOST_LIB})
+ list(REMOVE_DUPLICATES Boost_LIBRARIES)
+ if (NOT TARGET boost_${BOOST_LIB})
+ add_subdirectory(${BOOST_SOURCE_DIR}/libs/${BOOST_LIB} ${CMAKE_BINARY_DIR}/boost/libs/${BOOST_LIB})
+ endif()
+ endif()
+
+endmacro (add_boost_library)
+
+macro (add_firebreath_library_dir dir)
+ list(APPEND FBLIB_DIRS ${dir})
+ list(REMOVE_DUPLICATES FBLIB_DIRS)
+endmacro()
+
+macro (add_firebreath_library project_name)
+
+ foreach(LIB_DIR ${FBLIB_DIRS})
+ if (EXISTS ${LIB_DIR}/${project_name}/CMakeLists.txt)
+ get_target_property(library_target_exists ${project_name} TYPE)
+ if (NOT library_target_exists)
+ set(FBLIB_DEFINITIONS)
+ add_subdirectory(${LIB_DIR}/${project_name} ${CMAKE_CURRENT_BINARY_DIR}/fblibs/${project_name})
+ if (FBLIB_DEFINITIONS)
+ add_definitions(${FBLIB_DEFINITIONS})
+ endif()
+ endif()
+ endif()
+ endforeach()
+ set (LIB_KEY ${PLUGIN_NAME}_${project_name})
+ set (${LIB_KEY} YES)
+ set (${LIB_KEY} YES PARENT_SCOPE)
+ message("Set ${LIB_KEY} to ${${LIB_KEY}}")
+
+endmacro(add_firebreath_library)
+
+macro (append_firebreath_link_library name)
+ list(APPEND FBLIB_LIBRARIES ${name})
+ list(REMOVE_DUPLICATES FBLIB_LIBRARIES)
+endmacro(append_firebreath_link_library)
+
+macro (append_firebreath_include_dir dir)
+ list(APPEND FBLIB_INCLUDE_DIRS ${dir})
+ list(REMOVE_DUPLICATES FBLIB_INCLUDE_DIRS)
+endmacro(append_firebreath_include_dir)
+
+macro (add_firebreath_definition DEFS)
+ list(APPEND FBLIB_DEFINITIONS ${DEFS})
+ add_definitions(${DEFS})
+endmacro()
+
+macro (export_project_dependencies)
+ if (FBLIB_LIBRARIES)
+ list(REMOVE_DUPLICATES FBLIB_LIBRARIES)
+ endif()
+ if (FBLIB_INCLUDE_DIRS)
+ list(REMOVE_DUPLICATES FBLIB_INCLUDE_DIRS)
+ endif()
+ set (FBLIB_LIBRARIES ${FBLIB_LIBRARIES} PARENT_SCOPE)
+ set (FBLIB_INCLUDE_DIRS ${FBLIB_INCLUDE_DIRS} PARENT_SCOPE)
+ set (FBLIB_DEFINITIONS ${FBLIB_DEFINITIONS} PARENT_SCOPE)
+ set (Boost_LIBRARIES ${Boost_LIBRARIES} PARENT_SCOPE)
+ set (Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} PARENT_SCOPE)
+endmacro (export_project_dependencies)
+
+function (check_boost)
+ if (NOT WITH_SYSTEM_BOOST)
+ if (NOT EXISTS ${BOOST_SOURCE_DIR})
+ file(MAKE_DIRECTORY ${BOOST_SOURCE_DIR})
+ endif()
+ if (NOT EXISTS ${BOOST_SOURCE_DIR}/boost/)
+ set (FB_URL "https://github.com/firebreath/firebreath-boost/tarball/master")
+ message("Boost not found; downloading latest FireBreath-boost from GitHub (http://github.com/firebreath/firebreath-boost)")
+ find_program(GIT git NO_DEFAULT_PATHS)
+ if (EXISTS ${FB_ROOT_DIR}/.git AND NOT ${GIT} MATCHES "GIT-NOTFOUND")
+ message("Using git")
+ if (${GIT} MATCHES "GIT-NOTFOUND")
+ message(FATAL_ERROR "Can't find git in the path. Please run 'git submodule update --init --recursive' to get firebreath-boost.")
+ endif()
+ execute_process(
+ COMMAND ${GIT}
+ submodule update --recursive --init
+ WORKING_DIRECTORY "${FB_ROOT_DIR}")
+ else()
+ message("Downloading...")
+ find_program(CURL curl)
+ find_program(WGET wget PATHS "${CMAKE_DIR}/")
+ if (NOT ${WGET} MATCHES "WGET-NOTFOUND")
+ execute_process(
+ COMMAND ${WGET}
+ --no-check-certificate
+ -O "${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz"
+ "${FB_URL}"
+ )
+ elseif (NOT ${CURL} MATCHES "CURL-NOTFOUND")
+ execute_process(
+ COMMAND ${CURL}
+ -L "${FB_URL}"
+ -k
+ OUTPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz"
+ )
+ else()
+ file (DOWNLOAD "${FB_URL}" "${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz" STATUS DL_STATUS SHOW_PROGRESS)
+ message("Result: ${DL_STATUS}")
+ endif()
+ if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz")
+ message("Error downloading firebreath-boost. Please get firebreath-boost from ")
+ message("http://github.com/firebreath/firebreath-boost and install it into")
+ message("the src/3rdParty/boost directory. When properly installed, you should have:")
+ message(" src/3rdParty/boost/boost/")
+ message(" src/3rdParty/boost/libs/")
+ message(FATAL_ERROR "firebreath-boost could not be installed. Please install manually.")
+ endif()
+ find_program(TAR tar NO_DEFAULT_PATHS)
+ find_program(GZIP gzip NO_DEFAULT_PATHS)
+ if (WIN32)
+ message("Using 7-zip to extract the archive")
+ find_program(SEVZIP 7za PATHS "${CMAKE_DIR}/")
+ execute_process(
+ COMMAND ${SEVZIP}
+ e "${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz"
+ WORKING_DIRECTORY "${BOOST_SOURCE_DIR}"
+ OUTPUT_QUIET
+ )
+ file (GLOB TAR_FILE
+ ${BOOST_SOURCE_DIR}/*.tar
+ )
+ execute_process(
+ COMMAND ${SEVZIP}
+ x "${TAR_FILE}"
+ WORKING_DIRECTORY "${BOOST_SOURCE_DIR}"
+ OUTPUT_QUIET
+ )
+ file(REMOVE ${TAR_FILE})
+ elseif (NOT ${TAR} MATCHES "TAR-NOTFOUND" AND NOT ${GZIP} MATCHES "GZIP-NOTFOUND")
+ message("Using tar xzf to extract the archive")
+ execute_process(
+ COMMAND ${TAR}
+ xzf "${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz"
+ WORKING_DIRECTORY "${BOOST_SOURCE_DIR}"
+ OUTPUT_QUIET
+ )
+ else()
+ message("Please extract ${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz and ")
+ message("move the boost/ and libs/ subdirectories ")
+ message("to ${BOOST_SOURCE_DIR}/boost and ${BOOST_SOURCE_DIR}/libs")
+ message(FATAL_ERROR "Firebreath-boost not installed! (follow above directions to resolve)")
+ endif()
+ #file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/boost.tar.gz)
+ message("Installing firebreath-boost...")
+ file (GLOB _BOOST_FILES
+ ${BOOST_SOURCE_DIR}/firebreath-firebreath-boost*/*)
+ foreach (_CUR_FILE ${_BOOST_FILES})
+ get_filename_component (_CUR_FILENAME ${_CUR_FILE} NAME)
+ file(RENAME ${_CUR_FILE} ${BOOST_SOURCE_DIR}/${_CUR_FILENAME})
+ endforeach()
+ message("Cleaning up firebreath-boost temp install files...")
+ file (GLOB _BOOST_TMPFILES
+ ${BOOST_SOURCE_DIR}/firebreath*
+ ${BOOST_SOURCE_DIR}/pax*)
+ file (REMOVE_RECURSE ${_BOOST_TMPFILES})
+ endif()
+ endif()
+ endif()
+endfunction()
View
4 cmake/dummy.cpp
@@ -1,3 +1,3 @@
-// This is a dummy file used to allow CMake to create a project empty of real source files,
-// e.g. for an installer project or a "header-file only" project in Visual Studio.
+// This is a dummy file used to allow CMake to create a project empty of real source files,
+// e.g. for an installer project or a "header-file only" project in Visual Studio.
View
80 cmake/paths.cmake
@@ -1,40 +1,40 @@
-#/**********************************************************\
-#Original Author: Richard Bateman (taxilian)
-#
-#Created: Nov 20, 2009
-#License: Dual license model; choose one of two:
-# New BSD License
-# http://www.opensource.org/licenses/bsd-license.php
-# - or -
-# GNU Lesser General Public License, version 2.1
-# http://www.gnu.org/licenses/lgpl-2.1.html
-#
-#Copyright 2009 PacketPass, Inc and the Firebreath development team
-#\**********************************************************/
-
-get_filename_component (PROJECTS_SOURCE_DIR "${PROJECTS_DIR}" ABSOLUTE)
-set (PROJECTS_BINARY_DIR "${CMAKE_BINARY_DIR}/projects")
-
-set (BOOST_SOURCE_DIR ${SOURCE_DIR}/3rdParty/boost)
-set (BOOST_THREAD_SOURCE_DIR ${BOOST_SOURCE_DIR}/libs/thread)
-
-set (GECKOSDK_SOURCE_DIR ${SOURCE_DIR}/3rdParty/gecko-sdk/includes)
-
-set (ACTIVEXCORE_SOURCE_DIR "${SOURCE_DIR}/ActiveXCore")
-set (ACTIVEXCORETEST_SOURCE_DIR "${TEST_DIR}/ActiveXCoreTest")
-
-set (NPAPIHOST_SOURCE_DIR "${SOURCE_DIR}/NPAPIHost")
-
-set (NPAPICORE_SOURCE_DIR "${SOURCE_DIR}/NpapiCore")
-set (NPAPICORETEST_SOURCE_DIR "${TEST_DIR}/NpapiCoreTest")
-
-set (SCRIPTINGCORE_SOURCE_DIR "${SOURCE_DIR}/ScriptingCore")
-set (SCRIPTINGCORETEST_SOURCE_DIR "${TEST_DIR}/ScriptingCoreTest")
-
-set (PLUGINCORE_SOURCE_DIR "${SOURCE_DIR}/PluginCore")
-
-set (PLUGINAUTO_SOURCE_DIR "${SOURCE_DIR}/PluginAuto")
-
-set (UNITTEST_FW_SOURCE_DIR "${TEST_DIR}/unittest-cpp/UnitTest++")
-
-set(FBLIB_DIRS "${CMAKE_SOURCE_DIR}/src/libs")
+#/**********************************************************\
+#Original Author: Richard Bateman (taxilian)
+#
+#Created: Nov 20, 2009
+#License: Dual license model; choose one of two:
+# New BSD License
+# http://www.opensource.org/licenses/bsd-license.php
+# - or -
+# GNU Lesser General Public License, version 2.1
+# http://www.gnu.org/licenses/lgpl-2.1.html
+#
+#Copyright 2009 PacketPass, Inc and the Firebreath development team
+#\**********************************************************/
+
+get_filename_component (PROJECTS_SOURCE_DIR "${PROJECTS_DIR}" ABSOLUTE)
+set (PROJECTS_BINARY_DIR "${CMAKE_BINARY_DIR}/projects")
+
+set (BOOST_SOURCE_DIR ${SOURCE_DIR}/3rdParty/boost)
+set (BOOST_THREAD_SOURCE_DIR ${BOOST_SOURCE_DIR}/libs/thread)
+
+set (GECKOSDK_SOURCE_DIR ${SOURCE_DIR}/3rdParty/gecko-sdk/includes)
+
+set (ACTIVEXCORE_SOURCE_DIR "${SOURCE_DIR}/ActiveXCore")
+set (ACTIVEXCORETEST_SOURCE_DIR "${TEST_DIR}/ActiveXCoreTest")
+
+set (NPAPIHOST_SOURCE_DIR "${SOURCE_DIR}/NPAPIHost")
+
+set (NPAPICORE_SOURCE_DIR "${SOURCE_DIR}/NpapiCore")
+set (NPAPICORETEST_SOURCE_DIR "${TEST_DIR}/NpapiCoreTest")
+
+set (SCRIPTINGCORE_SOURCE_DIR "${SOURCE_DIR}/ScriptingCore")
+set (SCRIPTINGCORETEST_SOURCE_DIR "${TEST_DIR}/ScriptingCoreTest")
+
+set (PLUGINCORE_SOURCE_DIR "${SOURCE_DIR}/PluginCore")
+
+set (PLUGINAUTO_SOURCE_DIR "${SOURCE_DIR}/PluginAuto")
+
+set (UNITTEST_FW_SOURCE_DIR "${TEST_DIR}/unittest-cpp/UnitTest++")
+
+set(FBLIB_DIRS "${CMAKE_SOURCE_DIR}/src/libs")
View
268 cmake/projectConfig_main.cmake.in
@@ -1,134 +1,134 @@
-#/**********************************************************\
-#Original Author: Richard Bateman (taxilian)
-#
-#Created: Nov 20, 2009
-#License: Dual license model; choose one of two:
-# New BSD License
-# http://www.opensource.org/licenses/bsd-license.php
-# - or -
-# GNU Lesser General Public License, version 2.1
-# http://www.gnu.org/licenses/lgpl-2.1.html
-#
-#Copyright 2009 PacketPass, Inc and the Firebreath development team
-#\**********************************************************/
-
-get_filename_component (GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}" ABSOLUTE)
-
-get_filename_component(TEMPLATE_DIR "${FB_ROOT_DIR}/gen_templates" ABSOLUTE)
-get_filename_component(TEMPLATE_DEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/gen" ABSOLUTE)
-message("Generating plugin configuration files in ${TEMPLATE_DEST_DIR}")
-
-add_definitions(${FBLIB_DEFINITIONS})
-
-include_directories(
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${GECKOSDK_SOURCE_DIR}
- ${FB_INCLUDE_DIRS}
- ${NPAPICORE_SOURCE_DIR}
- ${ACTIVEXCORE_SOURCE_DIR}
- ${SCRIPTINGCORE_SOURCE_DIR}
- ${PLUGINAUTO_SOURCE_DIR}
- ${PLUGINAUTO_SOURCE_DIR}/Win
- ${PLUGINCORE_SOURCE_DIR}
- ${GEN_DIR}/gen
- ${Boost_INCLUDE_DIRS}
- ${FBLIB_INCLUDE_DIRS}
- ${ATL_INCLUDE_DIRS}
- ${CONFIG_DIR}
- )
-
-# set up the mimetype strings
-string(REPLACE ";" "|" FBMIMETYPE_LIST "${FBSTRING_MIMEType}")
-
-# configure default generated files
-file(GLOB TEMPLATELIST ${TEMPLATE_DIR}/[^.]*)
-foreach(TemplateFile ${TEMPLATELIST})
- get_filename_component(CURFILE ${TemplateFile} NAME)
- get_filename_component(CUREXT ${TemplateFile} EXT)
- if (CUREXT STREQUAL ".h" OR CUREXT STREQUAL ".hpp" OR CUREXT STREQUAL ".inc")
- set (CUR_DEST ${TEMPLATE_DEST_DIR}/global)
- else()
- set (CUR_DEST ${TEMPLATE_DEST_DIR})
- endif()
- if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${CURFILE})
- if (VERBOSE)
- message("Configuring ${CURFILE} from project source dir")
- endif()
- configure_template(${CMAKE_CURRENT_SOURCE_DIR}/${CURFILE} ${CUR_DEST}/${CURFILE})
- else()
- if (VERBOSE)
- message("Configuring ${CURFILE}")
- endif()
- configure_template(${TEMPLATE_DIR}/${CURFILE} ${CUR_DEST}/${CURFILE})
- endif()
-endforeach()
-
-# configure project-specific generated files
-file(GLOB TEMPLATELIST ${CMAKE_CURRENT_SOURCE_DIR}/templates/[^.]*)
-foreach(TemplateFile ${TEMPLATELIST})
- get_filename_component(CURFILE ${TemplateFile} NAME)
- message("Configuring ${CURFILE}")
- configure_template(${CMAKE_CURRENT_SOURCE_DIR}/templates/${CURFILE} ${TEMPLATE_DEST_DIR}/${CURFILE})
-endforeach()
-
-# Repititions in the following are intentional to fix linking errors due to
-# cyclic references on Linux. Don't change without testing on Linux!
-set(PLUGIN_INTERNAL_DEPS
- PluginCore
- ${PLUGIN_PREFIX}_PluginAuto
- NpapiCore
- ScriptingCore
- PluginCore
- ${Boost_LIBRARIES}
- ${FBLIB_LIBRARIES}
- )
-
-if (WIN32)
- set (PLUGIN_INTERNAL_DEPS
- ActiveXCore
- ${PLUGIN_INTERNAL_DEPS}
- ${ATL_LIBRARY}
- )
-
- file (GLOB GENERATED RELATIVE ${CMAKE_CURRENT_BINARY_DIR}
- ${GEN_DIR}/gen/[^.]*.rgs
- ${GEN_DIR}/gen/[^.]*.def
- ${GEN_DIR}/gen/[^.]*.rc
- )
-
-endif(WIN32)
-
-if (APPLE)
- if (FBMAC_USE_CARBON)
- find_library(CARBON_FRAMEWORK Carbon)
- set (PLUGIN_INTERNAL_DEPS
- ${CARBON_FRAMEWORK}
- ${PLUGIN_INTERNAL_DEPS})
- endif (FBMAC_USE_CARBON)
-
- #if (FBMAC_USE_COCOA)
- # In order to support async thread calls (needed for all events and other things)
- # we always need cocoa
- find_library(COCOA_FRAMEWORK Cocoa)
- set (PLUGIN_INTERNAL_DEPS
- ${COCOA_FRAMEWORK}
- ${PLUGIN_INTERNAL_DEPS})
- #endif (FBMAC_USE_COCOA)
-
- if (FBMAC_USE_COREANIMATION OR FBMAC_USE_COREGRAPHICS)
- find_library(FOUNDATION_FRAMEWORK Foundation)
- find_library(APPLICATIONSERVICES_FRAMEWORK ApplicationServices)
- set (PLUGIN_INTERNAL_DEPS
- ${FOUNDATION_FRAMEWORK}
- ${APPLICATIONSERVICES_FRAMEWORK}
- ${PLUGIN_INTERNAL_DEPS})
- endif (FBMAC_USE_COREANIMATION OR FBMAC_USE_COREGRAPHICS)
-
- if (FBMAC_USE_COREANIMATION)
- find_library(QUARTZCORE_FRAMEWORK QuartzCore)
- set (PLUGIN_INTERNAL_DEPS
- ${QUARTZCORE_FRAMEWORK}
- ${PLUGIN_INTERNAL_DEPS})
- endif (FBMAC_USE_COREANIMATION)
-endif (APPLE)
-
+#/**********************************************************\
+#Original Author: Richard Bateman (taxilian)
+#
+#Created: Nov 20, 2009
+#License: Dual license model; choose one of two:
+# New BSD License
+# http://www.opensource.org/licenses/bsd-license.php
+# - or -
+# GNU Lesser General Public License, version 2.1
+# http://www.gnu.org/licenses/lgpl-2.1.html
+#
+#Copyright 2009 PacketPass, Inc and the Firebreath development team
+#\**********************************************************/
+
+get_filename_component (GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}" ABSOLUTE)
+
+get_filename_component(TEMPLATE_DIR "${FB_ROOT_DIR}/gen_templates" ABSOLUTE)
+get_filename_component(TEMPLATE_DEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/gen" ABSOLUTE)
+message("Generating plugin configuration files in ${TEMPLATE_DEST_DIR}")
+
+add_definitions(${FBLIB_DEFINITIONS})
+
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${GECKOSDK_SOURCE_DIR}
+ ${FB_INCLUDE_DIRS}
+ ${NPAPICORE_SOURCE_DIR}
+ ${ACTIVEXCORE_SOURCE_DIR}
+ ${SCRIPTINGCORE_SOURCE_DIR}
+ ${PLUGINAUTO_SOURCE_DIR}
+ ${PLUGINAUTO_SOURCE_DIR}/Win
+ ${PLUGINCORE_SOURCE_DIR}
+ ${GEN_DIR}/gen
+ ${Boost_INCLUDE_DIRS}
+ ${FBLIB_INCLUDE_DIRS}
+ ${ATL_INCLUDE_DIRS}
+ ${CONFIG_DIR}
+ )
+
+# set up the mimetype strings
+string(REPLACE ";" "|" FBMIMETYPE_LIST "${FBSTRING_MIMEType}")
+
+# configure default generated files
+file(GLOB TEMPLATELIST ${TEMPLATE_DIR}/[^.]*)
+foreach(TemplateFile ${TEMPLATELIST})
+ get_filename_component(CURFILE ${TemplateFile} NAME)
+ get_filename_component(CUREXT ${TemplateFile} EXT)
+ if (CUREXT STREQUAL ".h" OR CUREXT STREQUAL ".hpp" OR CUREXT STREQUAL ".inc")
+ set (CUR_DEST ${TEMPLATE_DEST_DIR}/global)
+ else()
+ set (CUR_DEST ${TEMPLATE_DEST_DIR})
+ endif()
+ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${CURFILE})
+ if (VERBOSE)
+ message("Configuring ${CURFILE} from project source dir")
+ endif()
+ configure_template(${CMAKE_CURRENT_SOURCE_DIR}/${CURFILE} ${CUR_DEST}/${CURFILE})
+ else()
+ if (VERBOSE)
+ message("Configuring ${CURFILE}")
+ endif()
+ configure_template(${TEMPLATE_DIR}/${CURFILE} ${CUR_DEST}/${CURFILE})
+ endif()
+endforeach()
+
+# configure project-specific generated files
+file(GLOB TEMPLATELIST ${CMAKE_CURRENT_SOURCE_DIR}/templates/[^.]*)
+foreach(TemplateFile ${TEMPLATELIST})
+ get_filename_component(CURFILE ${TemplateFile} NAME)
+ message("Configuring ${CURFILE}")
+ configure_template(${CMAKE_CURRENT_SOURCE_DIR}/templates/${CURFILE} ${TEMPLATE_DEST_DIR}/${CURFILE})
+endforeach()
+
+# Repititions in the following are intentional to fix linking errors due to
+# cyclic references on Linux. Don't change without testing on Linux!
+set(PLUGIN_INTERNAL_DEPS
+ PluginCore
+ ${PLUGIN_PREFIX}_PluginAuto
+ NpapiCore
+ ScriptingCore
+ PluginCore
+ ${Boost_LIBRARIES}
+ ${FBLIB_LIBRARIES}
+ )
+
+if (WIN32)
+ set (PLUGIN_INTERNAL_DEPS
+ ActiveXCore
+ ${PLUGIN_INTERNAL_DEPS}
+ ${ATL_LIBRARY}
+ )
+
+ file (GLOB GENERATED RELATIVE ${CMAKE_CURRENT_BINARY_DIR}
+ ${GEN_DIR}/gen/[^.]*.rgs
+ ${GEN_DIR}/gen/[^.]*.def
+ ${GEN_DIR}/gen/[^.]*.rc
+ )
+
+endif(WIN32)
+
+if (APPLE)
+ if (FBMAC_USE_CARBON)
+ find_library(CARBON_FRAMEWORK Carbon)
+ set (PLUGIN_INTERNAL_DEPS
+ ${CARBON_FRAMEWORK}
+ ${PLUGIN_INTERNAL_DEPS})
+ endif (FBMAC_USE_CARBON)
+
+ #if (FBMAC_USE_COCOA)
+ # In order to support async thread calls (needed for all events and other things)
+ # we always need cocoa
+ find_library(COCOA_FRAMEWORK Cocoa)
+ set (PLUGIN_INTERNAL_DEPS
+ ${COCOA_FRAMEWORK}
+ ${PLUGIN_INTERNAL_DEPS})
+ #endif (FBMAC_USE_COCOA)
+
+ if (FBMAC_USE_COREANIMATION OR FBMAC_USE_COREGRAPHICS)
+ find_library(FOUNDATION_FRAMEWORK Foundation)
+ find_library(APPLICATIONSERVICES_FRAMEWORK ApplicationServices)
+ set (PLUGIN_INTERNAL_DEPS
+ ${FOUNDATION_FRAMEWORK}
+ ${APPLICATIONSERVICES_FRAMEWORK}
+ ${PLUGIN_INTERNAL_DEPS})
+ endif (FBMAC_USE_COREANIMATION OR FBMAC_USE_COREGRAPHICS)
+
+ if (FBMAC_USE_COREANIMATION)
+ find_library(QUARTZCORE_FRAMEWORK QuartzCore)
+ set (PLUGIN_INTERNAL_DEPS
+ ${QUARTZCORE_FRAMEWORK}
+ ${PLUGIN_INTERNAL_DEPS})
+ endif (FBMAC_USE_COREANIMATION)
+endif (APPLE)
+
View
416 cmake/wix.cmake
@@ -1,208 +1,208 @@
-# - Try to find Windows Installer XML
-# See http://wix.sourceforge.net
-#
-# The follwoing variables are optionally searched for defaults
-# WIX_ROOT_DIR: Base directory of WIX2 tree to use.
-#
-# The following are set after configuration is done:
-# WIX_FOUND
-# WIX_ROOT_DIR
-# WIX_CANDLE
-# WIX_LIGHT
-#
-# 2009/02 Petr Pytelka (pyta at lightcomp.cz)
-#
-
-if (WIN32)
- MACRO(DBG_MSG _MSG)
- if (VERBOSE)
- MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}):\r\n ${_MSG}")
- endif()
- ENDMACRO(DBG_MSG)
-
-
- if (NOT WIX_ROOT_DIR)
- # typical root dirs of installations, exactly one of them is used
- SET (WIX_POSSIBLE_ROOT_DIRS
- "${WIX_ROOT_DIR}"
- "$ENV{WIX}"
- "$ENV{WIX_ROOT_DIR}"
- "$ENV{ProgramFiles}/Windows Installer XML"
- "$ENV{ProgramFiles}/Windows Installer XML v3"
- "$ENV{ProgramFiles}/Windows Installer XML v3.5"
- "$ENV{ProgramFiles}/Windows Installer XML v3.6"
- )
-
-
- #DBG_MSG("DBG (WIX_POSSIBLE_ROOT_DIRS=${WIX_POSSIBLE_ROOT_DIRS}")
-
- #
- # select exactly ONE WIX base directory/tree
- # to avoid mixing different version headers and libs
- #
- FIND_PATH(WIX_ROOT_DIR
- NAMES
- bin/candle.exe
- bin/light.exe
- bin/heat.exe
- PATHS ${WIX_POSSIBLE_ROOT_DIRS})
- DBG_MSG("WIX_ROOT_DIR=${WIX_ROOT_DIR}")
- endif()
-
-
- #
- # Logic selecting required libs and headers
- #
- SET(WIX_FOUND OFF)
- IF(WIX_ROOT_DIR)
- SET(WIX_FOUND ON)
- ENDIF(WIX_ROOT_DIR)
-
-
- # display help message
- IF(NOT WIX_FOUND)
- # make FIND_PACKAGE friendly
- IF(NOT WIX_FIND_QUIETLY)
- IF(WIX_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR
- "Windows Installer XML required but some files not found. Please specify it's location with WIX_ROOT_DIR env. variable.")
- ENDIF(WIX_FIND_REQUIRED)
- ENDIF(NOT WIX_FIND_QUIETLY)
- ELSE(NOT WIX_FOUND)
- SET(WIX_CANDLE ${WIX_ROOT_DIR}/bin/candle.exe)
- SET(WIX_LIGHT ${WIX_ROOT_DIR}/bin/light.exe)
- SET(WIX_HEAT ${WIX_ROOT_DIR}/bin/heat.exe)
- # MESSAGE(STATUS "Windows Installer XML found.")
- ENDIF(NOT WIX_FOUND)
-
-
- MARK_AS_ADVANCED(
- WIX_ROOT_DIR
- WIX_CANDLE
- WIX_LIGHT
- WIX_HEAT
- )
-
- #
- # Call wix compiler
- #
- # Parameters:
- # _sources - name of list with sources
- # _obj - name of list for target objects
- #
- MACRO(WIX_COMPILE _sources _objs _extra_dep)
- DBG_MSG("WIX compile: ${${_sources}}")
- FOREACH (_current_FILE ${${_sources}})
- GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE)
- GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE)
-
- SET (SOURCE_WIX_FILE ${_tmp_FILE} )
- DBG_MSG("WIX source file: ${SOURCE_WIX_FILE}")
-
- SET (OUTPUT_WIXOBJ ${_basename}.wixobj )
-
- DBG_MSG("WIX output: ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}")
- DBG_MSG("WIX command: ${WIX_CANDLE}")
- SET(EXT_FLAGS -ext WixUtilExtension)
- SET(EXT_FLAGS ${EXT_FLAGS} -ext WixUIExtension)
-
- ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}
- COMMAND ${WIX_CANDLE}
- ARGS ${WIX_CANDLE_FLAGS} ${EXT_FLAGS} ${SOURCE_WIX_FILE}
- DEPENDS ${SOURCE_WIX_FILE} ${${_extra_dep}}
- COMMENT "Compiling ${SOURCE_WIX_FILE} -> ${OUTPUT_WIXOBJ}"
- )
- SET(${_objs} ${${_objs}} ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ} )
- DBG_MSG("WIX compile output: ${${_objs}}")
-
- ENDFOREACH (_current_FILE)
- ENDMACRO(WIX_COMPILE)
-
- #
- # Call wix heat command for the specified DLLs
- #
- # Parameters:
- # _sources - name of list with DLLs
- # _obj - name of list for target objects
- #
- MACRO(WIX_HEAT _sources _objs)
- DBG_MSG("WiX heat: ${${_sources}}")
- FOREACH (_current_DLL ${${_sources}})
- GET_FILENAME_COMPONENT(_tmp_FILE ${_current_DLL} ABSOLUTE)
- GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE)
-
- SET (SOURCE_WIX_FILE ${_tmp_FILE} )
-
- SET (OUTPUT_WIXOBJ ${_basename}.wxs )
-
- DBG_MSG("WIX output: ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}")
- DBG_MSG("WIX command: ${WIX_HEAT}")
-
- ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}
- COMMAND ${WIX_HEAT}
- ARGS file ${SOURCE_WIX_FILE}
- -out ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}
- ${WIX_HEAT_FLAGS}
- DEPENDS ${SOURCE_WIX_FILE}
- COMMENT "Compiling ${SOURCE_WIX_FILE} -> ${OUTPUT_WIXOBJ}"
- )
- SET(${_objs} ${${_objs}} ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ} )
- ENDFOREACH(_current_DLL)
- DBG_MSG("WIX compile output: ${${_objs}}")
- ENDMACRO(WIX_HEAT)
-
- #
- # Call wix compiler
- #
- # Parameters:
- # _sources - name of list with sources
- # _obj - name of list for target objects
- #
- MACRO(WIX_COMPILE_ALL _target _sources _extra_dep)
- DBG_MSG("WIX compile all: ${${_sources}}, dependencies: ${${_extra_dep}}")
- SET(EXT_FLAGS -ext WixUtilExtension)
- SET(EXT_FLAGS ${EXT_FLAGS} -ext WixUIExtension)
-
- ADD_CUSTOM_COMMAND(
- OUTPUT ${_target}
- COMMAND ${WIX_CANDLE}
- ARGS ${WIX_CANDLE_FLAGS} ${EXT_FLAGS} -out "${_target}" ${${_sources}}
- DEPENDS ${${_sources}} ${${_extra_dep}}
- COMMENT "Compiling ${${_sources}} -> ${_target}"
- )
-
- ENDMACRO(WIX_COMPILE_ALL)
-
-
- #
- # Link MSI file as post-build action
- #
- # Parameters
- # _target - Name of target file
- # _sources - Name of list with sources
- #
- MACRO(WIX_LINK _project _target _sources _loc_files)
- #DBG_MSG("WIX command: ${WIX_LIGHT}\n WIX target: ${_target} objs: ${${_sources}}")
-
- SET( WIX_LINK_FLAGS_A ${WIX_LINK_FLAGS} )
- SET(EXT_FLAGS -ext WixUtilExtension)
- SET(EXT_FLAGS ${EXT_FLAGS} -ext WixUIExtension)
-
- # Add localization
- FOREACH (_current_FILE ${${_loc_files}})
- SET( WIX_LINK_FLAGS_A ${WIX_LINK_FLAGS_A} -loc "${_current_FILE}" )
- DBG_MSG("WIX link localization: ${_current_FILE}")
- ENDFOREACH (_current_FILE)
- DBG_MSG("WIX link flags: ${WIX_LINK_FLAGS_A}")
-
- ADD_CUSTOM_COMMAND( TARGET ${_project} POST_BUILD
- COMMAND ${WIX_LIGHT}
- ARGS ${WIX_LINK_FLAGS_A} ${EXT_FLAGS} -out "${_target}" ${${_sources}}
- DEPENDS ${${_sources}}
- COMMENT "Linking ${${_sources}} -> ${_target}"
- )
-
- ENDMACRO(WIX_LINK)
-endif(WIN32)
+# - Try to find Windows Installer XML
+# See http://wix.sourceforge.net
+#
+# The follwoing variables are optionally searched for defaults
+# WIX_ROOT_DIR: Base directory of WIX2 tree to use.
+#
+# The following are set after configuration is done:
+# WIX_FOUND
+# WIX_ROOT_DIR
+# WIX_CANDLE
+# WIX_LIGHT
+#
+# 2009/02 Petr Pytelka (pyta at lightcomp.cz)
+#
+
+if (WIN32)
+ MACRO(DBG_MSG _MSG)
+ if (VERBOSE)
+ MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}):\r\n ${_MSG}")
+ endif()
+ ENDMACRO(DBG_MSG)
+
+
+ if (NOT WIX_ROOT_DIR)
+ # typical root dirs of installations, exactly one of them is used
+ SET (WIX_POSSIBLE_ROOT_DIRS
+ "${WIX_ROOT_DIR}"
+ "$ENV{WIX}"
+ "$ENV{WIX_ROOT_DIR}"
+ "$ENV{ProgramFiles}/Windows Installer XML"
+ "$ENV{ProgramFiles}/Windows Installer XML v3"
+ "$ENV{ProgramFiles}/Windows Installer XML v3.5"
+ "$ENV{ProgramFiles}/Windows Installer XML v3.6"
+ )
+
+
+ #DBG_MSG("DBG (WIX_POSSIBLE_ROOT_DIRS=${WIX_POSSIBLE_ROOT_DIRS}")
+
+ #
+ # select exactly ONE WIX base directory/tree
+ # to avoid mixing different version headers and libs
+ #
+ FIND_PATH(WIX_ROOT_DIR
+ NAMES
+ bin/candle.exe
+ bin/light.exe
+ bin/heat.exe
+ PATHS ${WIX_POSSIBLE_ROOT_DIRS})
+ DBG_MSG("WIX_ROOT_DIR=${WIX_ROOT_DIR}")
+ endif()
+
+
+ #
+ # Logic selecting required libs and headers
+ #
+ SET(WIX_FOUND OFF)
+ IF(WIX_ROOT_DIR)
+ SET(WIX_FOUND ON)
+ ENDIF(WIX_ROOT_DIR)
+
+
+ # display help message
+ IF(NOT WIX_FOUND)
+ # make FIND_PACKAGE friendly
+ IF(NOT WIX_FIND_QUIETLY)
+ IF(WIX_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR
+ "Windows Installer XML required but some files not found. Please specify it's location with WIX_ROOT_DIR env. variable.")
+ ENDIF(WIX_FIND_REQUIRED)
+ ENDIF(NOT WIX_FIND_QUIETLY)
+ ELSE(NOT WIX_FOUND)
+ SET(WIX_CANDLE ${WIX_ROOT_DIR}/bin/candle.exe)
+ SET(WIX_LIGHT ${WIX_ROOT_DIR}/bin/light.exe)
+ SET(WIX_HEAT ${WIX_ROOT_DIR}/bin/heat.exe)
+ # MESSAGE(STATUS "Windows Installer XML found.")
+ ENDIF(NOT WIX_FOUND)
+
+
+ MARK_AS_ADVANCED(
+ WIX_ROOT_DIR
+ WIX_CANDLE
+ WIX_LIGHT
+ WIX_HEAT
+ )
+
+ #
+ # Call wix compiler
+ #
+ # Parameters:
+ # _sources - name of list with sources
+ # _obj - name of list for target objects
+ #
+ MACRO(WIX_COMPILE _sources _objs _extra_dep)
+ DBG_MSG("WIX compile: ${${_sources}}")
+ FOREACH (_current_FILE ${${_sources}})
+ GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE)
+ GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE)
+
+ SET (SOURCE_WIX_FILE ${_tmp_FILE} )
+ DBG_MSG("WIX source file: ${SOURCE_WIX_FILE}")
+
+ SET (OUTPUT_WIXOBJ ${_basename}.wixobj )
+
+ DBG_MSG("WIX output: ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}")
+ DBG_MSG("WIX command: ${WIX_CANDLE}")
+ SET(EXT_FLAGS -ext WixUtilExtension)
+ SET(EXT_FLAGS ${EXT_FLAGS} -ext WixUIExtension)
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}
+ COMMAND ${WIX_CANDLE}
+ ARGS ${WIX_CANDLE_FLAGS} ${EXT_FLAGS} ${SOURCE_WIX_FILE}
+ DEPENDS ${SOURCE_WIX_FILE} ${${_extra_dep}}
+ COMMENT "Compiling ${SOURCE_WIX_FILE} -> ${OUTPUT_WIXOBJ}"
+ )
+ SET(${_objs} ${${_objs}} ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ} )
+ DBG_MSG("WIX compile output: ${${_objs}}")
+
+ ENDFOREACH (_current_FILE)
+ ENDMACRO(WIX_COMPILE)
+
+ #
+ # Call wix heat command for the specified DLLs
+ #
+ # Parameters:
+ # _sources - name of list with DLLs
+ # _obj - name of list for target objects
+ #
+ MACRO(WIX_HEAT _sources _objs)
+ DBG_MSG("WiX heat: ${${_sources}}")
+ FOREACH (_current_DLL ${${_sources}})
+ GET_FILENAME_COMPONENT(_tmp_FILE ${_current_DLL} ABSOLUTE)
+ GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE)
+
+ SET (SOURCE_WIX_FILE ${_tmp_FILE} )
+
+ SET (OUTPUT_WIXOBJ ${_basename}.wxs )
+
+ DBG_MSG("WIX output: ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}")
+ DBG_MSG("WIX command: ${WIX_HEAT}")
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}
+ COMMAND ${WIX_HEAT}
+ ARGS file ${SOURCE_WIX_FILE}
+ -out ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ}
+ ${WIX_HEAT_FLAGS}
+ DEPENDS ${SOURCE_WIX_FILE}
+ COMMENT "Compiling ${SOURCE_WIX_FILE} -> ${OUTPUT_WIXOBJ}"
+ )
+ SET(${_objs} ${${_objs}} ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_WIXOBJ} )
+ ENDFOREACH(_current_DLL)
+ DBG_MSG("WIX compile output: ${${_objs}}")
+ ENDMACRO(WIX_HEAT)
+
+ #
+ # Call wix compiler
+ #
+ # Parameters:
+ # _sources - name of list with sources
+ # _obj - name of list for target objects
+ #
+ MACRO(WIX_COMPILE_ALL _target _sources _extra_dep)
+ DBG_MSG("WIX compile all: ${${_sources}}, dependencies: ${${_extra_dep}}")
+ SET(EXT_FLAGS -ext WixUtilExtension)
+ SET(EXT_FLAGS ${EXT_FLAGS} -ext WixUIExtension)
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${_target}
+ COMMAND ${WIX_CANDLE}
+ ARGS ${WIX_CANDLE_FLAGS} ${EXT_FLAGS} -out "${_target}" ${${_sources}}
+ DEPENDS ${${_sources}} ${${_extra_dep}}
+ COMMENT "Compiling ${${_sources}} -> ${_target}"
+ )
+
+ ENDMACRO(WIX_COMPILE_ALL)
+
+
+ #
+ # Link MSI file as post-build action
+ #
+ # Parameters
+ # _target - Name of target file
+ # _sources - Name of list with sources
+ #
+ MACRO(WIX_LINK _project _target _sources _loc_files)
+ #DBG_MSG("WIX command: ${WIX_LIGHT}\n WIX target: ${_target} objs: ${${_sources}}")
+
+ SET( WIX_LINK_FLAGS_A ${WIX_LINK_FLAGS} )
+ SET(EXT_FLAGS -ext WixUtilExtension)
+ SET(EXT_FLAGS ${EXT_FLAGS} -ext WixUIExtension)
+
+ # Add localization
+ FOREACH (_current_FILE ${${_loc_files}})
+ SET( WIX_LINK_FLAGS_A ${WIX_LINK_FLAGS_A} -loc "${_current_FILE}" )
+ DBG_MSG("WIX link localization: ${_current_FILE}")
+ ENDFOREACH (_current_FILE)
+ DBG_MSG("WIX link flags: ${WIX_LINK_FLAGS_A}")
+
+ ADD_CUSTOM_COMMAND( TARGET ${_project} POST_BUILD
+ COMMAND ${WIX_LIGHT}
+ ARGS ${WIX_LINK_FLAGS_A} ${EXT_FLAGS} -out "${_target}" ${${_sources}}
+ DEPENDS ${${_sources}}
+ COMMENT "Linking ${${_sources}} -> ${_target}"
+ )
+
+ ENDMACRO(WIX_LINK)
+endif(WIN32)
View
142 common.cmd
@@ -1,71 +1,71 @@
-@echo off
-
-set FB_ROOT="%~dp0"
-set RUN_FROM=%CD%
-
-set _SHIFTTOK=0
-
-set _NPARAM=%~1
-IF /I "%_NPARAM%"=="" goto defaults
-IF /I "%_NPARAM:~0,1%"=="-" goto defaults
-set PROJDIR=%1
-shift
-set _SHIFTTOK=1
-
-set _NPARAM=%~1
-IF /I "%_NPARAM%"=="" goto default_build
-IF /I "%_NPARAM:~0,1%"=="-" goto default_build
-set BUILDDIR=%1
-shift
-set _SHIFTTOK=2
-
-goto finish
-
-:defaults
-set PROJDIR="%RUN_FROM%\projects"
-
-:default_build
-IF /I "%PROJDIR%"=="examples" goto examples
-set BUILDDIR="%RUN_FROM%\build"
-goto finish
-
-:examples
-echo Building examples
-set BUILDDIR="%RUN_FROM%\buildex"
-
-:finish
-IF EXIST %PROJDIR% GOTO direxists
-echo ERROR: Project directory %PROJDIR% does not exist. usage: prep[ver].cmd [project dir] [build dir]
-exit /B 2
-goto end
-
-:direxists
-REM We need the full path of the directories
-REM This is a hack, but it works
-pushd ""%PROJDIR%"" > NUL
-set PROJDIR="%CD%"
-popd > NUL
-mkdir ""%BUILDDIR%""
-pushd ""%BUILDDIR%"" > NUL
-if %errorlevel% == 1 goto error
-set BUILDDIR="%CD%"
-popd > NUL
-
-for /f "tokens=%_SHIFTTOK%*" %%a in ('echo.%*') do set CMAKE_PARAMS=%%b
-goto finished
-
-:error
-echo "Could not create build directory %BUILDDIR%"
-exit /B 2
-
-:finished
-echo Using projects in: %PROJDIR%
-echo Generating build files in: %BUILDDIR%
-echo NOTE: The build files in %BUILDDIR% should *NEVER* be modified directly.
-echo When needed, make project changes in cmake files and re-run this script.
-echo Project-specific cmake files are found in [plugin dir]\CMakeLists.txt and
-echo [plugin dir]\Win\projectDef.cmake.
-echo Note that parameters for cmake should be enclosed in double quotes, e.g. "-DVERBOSE=1"
-
-echo CMAKE parameters: %CMAKE_PARAMS%
-:end
+@echo off
+
+set FB_ROOT="%~dp0"
+set RUN_FROM=%CD%
+
+set _SHIFTTOK=0
+
+set _NPARAM=%~1
+IF /I "%_NPARAM%"=="" goto defaults
+IF /I "%_NPARAM:~0,1%"=="-" goto defaults
+set PROJDIR=%1
+shift
+set _SHIFTTOK=1
+
+set _NPARAM=%~1
+IF /I "%_NPARAM%"=="" goto default_build
+IF /I "%_NPARAM:~0,1%"=="-" goto default_build
+set BUILDDIR=%1
+shift
+set _SHIFTTOK=2
+
+goto finish
+
+:defaults
+set PROJDIR="%RUN_FROM%\projects"
+
+:default_build
+IF /I "%PROJDIR%"=="examples" goto examples
+set BUILDDIR="%RUN_FROM%\build"
+goto finish
+
+:examples
+echo Building examples
+set BUILDDIR="%RUN_FROM%\buildex"
+
+:finish
+IF EXIST %PROJDIR% GOTO direxists
+echo ERROR: Project directory %PROJDIR% does not exist. usage: prep[ver].cmd [project dir] [build dir]
+exit /B 2
+goto end
+
+:direxists
+REM We need the full path of the directories
+REM This is a hack, but it works
+pushd ""%PROJDIR%"" > NUL
+set PROJDIR="%CD%"
+popd > NUL
+mkdir ""%BUILDDIR%""
+pushd ""%BUILDDIR%"" > NUL
+if %errorlevel% == 1 goto error
+set BUILDDIR="%CD%"
+popd > NUL
+
+for /f "tokens=%_SHIFTTOK%*" %%a in ('echo.%*') do set CMAKE_PARAMS=%%b
+goto finished
+
+:error
+echo "Could not create build directory %BUILDDIR%"
+exit /B 2
+
+:finished
+echo Using projects in: %PROJDIR%
+echo Generating build files in: %BUILDDIR%
+echo NOTE: The build files in %BUILDDIR% should *NEVER* be modified directly.
+echo When needed, make project changes in cmake files and re-run this script.
+echo Project-specific cmake files are found in [plugin dir]\CMakeLists.txt and
+echo [plugin dir]\Win\projectDef.cmake.
+echo Note that parameters for cmake should be enclosed in double quotes, e.g. "-DVERBOSE=1"
+
+echo CMAKE parameters: %CMAKE_PARAMS%
+:end
View
106 examples/BasicMediaPlayer/CMakeLists.txt
@@ -1,53 +1,53 @@
-#/**********************************************************\
-#Original Author: Richard Bateman (taxilian)
-#
-#Created: Nov 20, 2009
-#License: Dual license model; choose one of two:
-# New BSD License
-# http://www.opensource.org/licenses/bsd-license.php
-# - or -
-# GNU Lesser General Public License, version 2.1
-# http://www.gnu.org/licenses/lgpl-2.1.html
-#
-#Copyright 2009 PacketPass, Inc and the Firebreath development team
-#\**********************************************************/
-
-# Written to work with cmake 2.6
-cmake_minimum_required (VERSION 2.6)
-set (CMAKE_BACKWARDS_COMPATIBILITY 2.6)
-
-include(${CMAKE_DIR}/common.cmake)
-
-set (PROJNAME ${PLUGIN_NAME})
-
-browserplugin_project(${PROJNAME})
-
-file (GLOB GENERAL RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
- *.cpp
- *.h
- *.cmake
- )
-
-file (GLOB GENERATED RELATIVE ${CMAKE_CURRENT_BINARY_DIR}
- ${GEN_DIR}/gen/*.rgs
- ${GEN_DIR}/gen/*.def
- ${GEN_DIR}/gen/*.htm
- ${GEN_DIR}/gen/*.rc
- )
-
-SET_SOURCE_FILES_PROPERTIES(
- ${GENERATED}
- PROPERTIES
- GENERATED 1
- )
-
-SOURCE_GROUP(Generated FILES
- ${GENERATED}
- )
-
-SET( SOURCES
- ${GENERAL}
- ${GENERATED}
- )
-
-include_platform()
+#/**********************************************************\
+#Original Author: Richard Bateman (taxilian)
+#
+#Created: Nov 20, 2009
+#License: Dual license model; choose one of two:
+# New BSD License
+# http://www.opensource.org/licenses/bsd-license.php
+# - or -
+# GNU Lesser General Public License, version 2.1
+# http://www.gnu.org/licenses/lgpl-2.1.html
+#
+#Copyright 2009 PacketPass, Inc and the Firebreath development team
+#\**********************************************************/
+
+# Written to work with cmake 2.6
+cmake_minimum_required (VERSION 2.6)
+set (CMAKE_BACKWARDS_COMPATIBILITY 2.6)
+
+include(${CMAKE_DIR}/common.cmake)
+
+set (PROJNAME ${PLUGIN_NAME})
+
+browserplugin_project(${PROJNAME})
+
+file (GLOB GENERAL RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.cpp
+ *.h
+ *.cmake
+ )
+
+file (GLOB GENERATED RELATIVE ${CMAKE_CURRENT_BINARY_DIR}
+ ${GEN_DIR}/gen/*.rgs
+ ${GEN_DIR}/gen/*.def
+ ${GEN_DIR}/gen/*.htm
+ ${GEN_DIR}/gen/*.rc
+ )
+
+SET_SOURCE_FILES_PROPERTIES(
+ ${GENERATED}
+ PROPERTIES
+ GENERATED 1
+ )
+
+SOURCE_GROUP(Generated FILES
+ ${GENERATED}
+ )
+
+SET( SOURCES
+ ${GENERAL}
+ ${GENERATED}
+ )
+
+include_platform()
View
8 examples/BasicMediaPlayer/Mac/bundle_template/InfoPlist.strings
@@ -1,4 +1,4 @@
-/* Localized versions of Info.plist keys */
-
-CFBundleName = "${PLUGIN_NAME}.plugin";
-NSHumanReadableCopyright = "${FBSTRING_LegalCopyright}";
+/* Localized versions of Info.plist keys */
+
+CFBundleName = "${PLUGIN_NAME}.plugin";
+NSHumanReadableCopyright = "${FBSTRING_LegalCopyright}";
View
36 examples/BasicMediaPlayer/Mac/bundle_template/Localized.r
@@ -1,18 +1,18 @@
-#include <CoreServices/CoreServices.r>
-
-resource 'STR#' (126)
-{ {
- "${FBSTRING_LegalCopyright}",
- "${FBSTRING_ProductName}"
-} };
-
-resource 'STR#' (127)
-{ {
- "${FBSTRING_FileDescription}"
-} };
-
-resource 'STR#' (128)
-{ {
- "${FBSTRING_MIMEType}",
- "${FBSTRING_FileExtents}"
-} };
+#include <CoreServices/CoreServices.r>
+
+resource 'STR#' (126)
+{ {
+ "${FBSTRING_LegalCopyright}",
+ "${FBSTRING_ProductName}"
+} };
+
+resource 'STR#' (127)
+{ {
+ "${FBSTRING_FileDescription}"
+} };
+
+resource 'STR#' (128)
+{ {
+ "${FBSTRING_MIMEType}",
+ "${FBSTRING_FileExtents}"
+} };
View
120 examples/BasicMediaPlayer/PluginConfig.cmake
@@ -1,60 +1,60 @@
-#/**********************************************************\
-#Original Author: Richard Bateman (taxilian)
-#
-#Created: Nov 20, 2009
-#License: Dual license model; choose one of two:
-# New BSD License
-# http://www.opensource.org/licenses/bsd-license.php
-# - or -
-# GNU Lesser General Public License, version 2.1
-# http://www.gnu.org/licenses/lgpl-2.1.html
-#
-#Copyright 2009 PacketPass, Inc and the Firebreath development team
-#\**********************************************************/
-
-set(PLUGIN_NAME "BasicMediaPlayer")
-set(PLUGIN_PREFIX "BasicMediaPlayer")
-set(COMPANY_NAME "FBDevTeam")
-
-# ActiveX constants:
-set(FBTYPELIB_NAME FireBreathWinLib)
-set(FBTYPELIB_DESC "BasicMediaPlayer 1.0 Type Library")
-set(IFBControl_DESC "BasicMediaPlayer FBControl Interface")
-set(FBControl_DESC "BasicMediaPlayer FBControl Class")
-set(IFBComJavascriptObject_DESC "BasicMediaPlayer IComJavascriptObject Interface")
-set(FBComJavascriptObject_DESC "BasicMediaPlayer ComJavascriptObject Class")
-set(IFBComEventSource_DESC "BasicMediaPlayer IFBComEventSource Interface")
-set(AXVERSION_NUM "1")
-
-# NOTE: THESE GUIDS *MUST* BE UNIQUE TO YOUR PLUGIN/ACTIVEX CONTROL! YES, ALL OF THEM!
-set(FBTYPELIB_GUID 967C9EC7-8E2F-405d-8492-C903DDCEABB1)
-set(IFBControl_GUID F54F82DB-DCE0-4a35-AB9E-43A1BE7DD721)
-set(FBControl_GUID E4C14033-C0B7-45ef-B5F7-66621858DA10)
-set(IFBComJavascriptObject_GUID 67244427-D855-44b5-8213-2433A05A9585)
-set(FBComJavascriptObject_GUID 5C244822-4155-4e60-AA1C-DD53EF191915)
-set(IFBComEventSource_GUID 77D5AF47-72BF-4015-AA3B-03FF24D59447)
-
-# these are the pieces that are relevant to using it from Javascript
-set(ACTIVEX_PROGID "FireBreath.BasicMediaPlayer")
-set(MOZILLA_PLUGINID "@firebreath.googlecode.com/Firebreath BasicMediaPlayer Plugin")
-
-# strings
-set(FBSTRING_CompanyName "FireBreath")
-set(FBSTRING_FileDescription "BasicMediaPlayer Plugin for the FireBreath Project")
-set(FBSTRING_PLUGIN_VERSION "1.0.0")
-set(FBSTRING_LegalCopyright "Copyright 2009 Firebreath development team")
-set(FBSTRING_PluginFileName "npBasicMediaPlayer.dll")
-set(FBSTRING_ProductName "FireBreath BasicMediaPlayer Plugin")
-set(FBSTRING_FileExtents "")
-set(FBSTRING_PluginName "FireBreath BasicMediaPlayer Plugin")
-set(FBSTRING_MIMEType "application/x-vnd.FBBasicMediaPlayer")
-
-# mac settings
-set (FBMAC_USE_CARBON 0)
-set (FBMAC_USE_COCOA 1)
-set (FBMAC_USE_QUICKDRAW 0)
-set (FBMAC_USE_COREGRAPHICS 0)
-set (FBMAC_USE_COREANIMATION 1)
-
-set (FBWIN_WINDOWLESS 0)
-
+#/**********************************************************\
+#Original Author: Richard Bateman (taxilian)
+#
+#Created: Nov 20, 2009
+#License: Dual license model; choose one of two:
+# New BSD License
+# http://www.opensource.org/licenses/bsd-license.php
+# - or -
+# GNU Lesser General Public License, version 2.1
+# http://www.gnu.org/licenses/lgpl-2.1.html
+#
+#Copyright 2009 PacketPass, Inc and the Firebreath development team
+#\**********************************************************/
+
+set(PLUGIN_NAME "BasicMediaPlayer")
+set(PLUGIN_PREFIX "BasicMediaPlayer")
+set(COMPANY_NAME "FBDevTeam")
+
+# ActiveX constants:
+set(FBTYPELIB_NAME FireBreathWinLib)
+set(FBTYPELIB_DESC "BasicMediaPlayer 1.0 Type Library")
+set(IFBControl_DESC "BasicMediaPlayer FBControl Interface")
+set(FBControl_DESC "BasicMediaPlayer FBControl Class")
+set(IFBComJavascriptObject_DESC "BasicMediaPlayer IComJavascriptObject Interface")
+set(FBComJavascriptObject_DESC "BasicMediaPlayer ComJavascriptObject Class")
+set(IFBComEventSource_DESC "BasicMediaPlayer IFBComEventSource Interface")
+set(AXVERSION_NUM "1")
+
+# NOTE: THESE GUIDS *MUST* BE UNIQUE TO YOUR PLUGIN/ACTIVEX CONTROL! YES, ALL OF THEM!
+set(FBTYPELIB_GUID 967C9EC7-8E2F-405d-8492-C903DDCEABB1)
+set(IFBControl_GUID F54F82DB-DCE0-4a35-AB9E-43A1BE7DD721)
+set(FBControl_GUID E4C14033-C0B7-45ef-B5F7-66621858DA10)
+set(IFBComJavascriptObject_GUID 67244427-D855-44b5-8213-2433A05A9585)
+set(FBComJavascriptObject_GUID 5C244822-4155-4e60-AA1C-DD53EF191915)
+set(IFBComEventSource_GUID 77D5AF47-72BF-4015-AA3B-03FF24D59447)
+
+# these are the pieces that are relevant to using it from Javascript
+set(ACTIVEX_PROGID "FireBreath.BasicMediaPlayer")
+set(MOZILLA_PLUGINID "@firebreath.googlecode.com/Firebreath BasicMediaPlayer Plugin")
+
+# strings
+set(FBSTRING_CompanyName "FireBreath")
+set(FBSTRING_FileDescription "BasicMediaPlayer Plugin for the FireBreath Project")
+set(FBSTRING_PLUGIN_VERSION "1.0.0")
+set(FBSTRING_LegalCopyright "Copyright 2009 Firebreath development team")
+set(FBSTRING_PluginFileName "npBasicMediaPlayer.dll")
+set(FBSTRING_ProductName "FireBreath BasicMediaPlayer Plugin")
+set(FBSTRING_FileExtents "")
+set(FBSTRING_PluginName "FireBreath BasicMediaPlayer Plugin")
+set(FBSTRING_MIMEType "application/x-vnd.FBBasicMediaPlayer")
+
+# mac settings
+set (FBMAC_USE_CARBON 0)
+set (FBMAC_USE_COCOA 1)
+set (FBMAC_USE_QUICKDRAW 0)
+set (FBMAC_USE_COREGRAPHICS 0)
+set (FBMAC_USE_COREANIMATION 1)
+
+set (FBWIN_WINDOWLESS 0)