forked from firebreath/FireBreath
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
57 lines (46 loc) · 2.2 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#/**********************************************************\
#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)
if (APPLE)
clear_xcode_patches()
endif()
message("Firebreath solution dir: " ${PROJECT_BINARY_DIR})
# Common projects -- projects that don't have any plugin specific code
add_subdirectory(${UNITTEST_FW_SOURCE_DIR} ${UNITTEST_FW_BINARY_DIR})
add_subdirectory(${NPAPIHOST_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/NpapiHost)
add_subdirectory(${SCRIPTINGCORE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/ScriptingCore)
add_subdirectory(${SCRIPTINGCORETEST_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/ScriptingCoreTest)
add_subdirectory(${PLUGINCORE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/PluginCore)
file (GLOB PLUGIN_PROJECTS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${PROJECT_SRC_DIR}/[^.]*
)
message("Searching ${PROJECT_SRC_DIR}/*: found ${PLUGIN_PROJECTS}")
foreach (CURPROJECT ${PLUGIN_PROJECTS})
if (EXISTS "${FB_ROOT_DIR}/${CURPROJECT}/CMakeLists.txt")
set (FOUND_PROJECTS 1)
get_filename_component(PROJNAME ${CURPROJECT} NAME_WE)
configure_file(${CMAKE_DIR}/projectConfig_main.cmake.in ${PROJECT_ROOT}/${PROJNAME}/projectConfig.cmake COPYONLY)
message("Configuring plugin project ${CURPROJECT} in ${PROJECT_ROOT}/${PROJNAME}")
add_subdirectory("${CURPROJECT}" "${PROJECT_ROOT}/${PROJNAME}")
endif()
endforeach()
if (NOT FOUND_PROJECTS)
MESSAGE("No projects found in ${PROJECT_SRC_DIR}/.")
MESSAGE(FATAL_ERROR "To build examples, run 'prep<ver> examples'")
endif()