aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorwsnipex <wsnipex@a1.net>2015-01-21 09:40:39 +0100
committermontellese <montellese@xbmc.org>2015-02-18 16:07:41 +0100
commit92d9ac1b257e76b6861376a5c7ac9018b134a9b7 (patch)
treedd6908db23827e8df3095c46d5b07434b3931ba0 /project
parent7bec2f41fc3c2bdc0c10b275f1c49a97e6fb8259 (diff)
cmake: add platform directory and parsing of platform specific definitions
Diffstat (limited to 'project')
-rw-r--r--project/cmake/addons/CMakeLists.txt14
-rw-r--r--project/cmake/platform/linux/defines.txt1
2 files changed, 15 insertions, 0 deletions
diff --git a/project/cmake/addons/CMakeLists.txt b/project/cmake/addons/CMakeLists.txt
index 4f047a5f21..114d32493c 100644
--- a/project/cmake/addons/CMakeLists.txt
+++ b/project/cmake/addons/CMakeLists.txt
@@ -39,6 +39,11 @@ else()
endif()
get_filename_component(DEPENDS_PATH "${DEPENDS_PATH}" ABSOLUTE)
+if(NOT PLATFORM_DIR)
+ set(PLATFORM_DIR ${APP_ROOT}/project/cmake/platform/${CORE_SYSTEM_NAME})
+ file(TO_CMAKE_PATH "${PLATFORM_DIR}" PLATFORM_DIR)
+endif()
+
# make sure CMAKE_PREFIX_PATH is set
if(NOT CMAKE_PREFIX_PATH)
set(CMAKE_PREFIX_PATH "${DEPENDS_PATH}")
@@ -92,6 +97,15 @@ else()
file(TO_CMAKE_PATH "${KODI_LIB_DIR}" KODI_LIB_DIR)
endif()
+# check for platform specific stuff
+if(EXISTS ${PLATFORM_DIR}/defines.txt)
+ file(STRINGS ${PLATFORM_DIR}/defines.txt platformdefines)
+
+ if(NOT ARCH_DEFINES AND platformdefines)
+ set(ARCH_DEFINES ${platformdefines})
+ endif()
+endif()
+
### prepare the build environment for the binary addons
# copy the prepare-env.cmake script to the depends path so that we can include it
file(COPY ${APP_ROOT}/project/cmake/scripts/common/prepare-env.cmake DESTINATION ${KODI_LIB_DIR})
diff --git a/project/cmake/platform/linux/defines.txt b/project/cmake/platform/linux/defines.txt
new file mode 100644
index 0000000000..3fe9c5caad
--- /dev/null
+++ b/project/cmake/platform/linux/defines.txt
@@ -0,0 +1 @@
+-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -fPIC