aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2016-10-14 13:00:44 +0200
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2016-10-14 13:00:44 +0200
commit44c774021933f0efab8c868acc21bfcdc2d31c50 (patch)
tree1f40d8bd954128a6c175b38df6dbe0bb9ea4d9a8
parentf515c3867a88c1bedcd857440223771157b02a54 (diff)
downloadcanvas_display.lv2-44c774021933f0efab8c868acc21bfcdc2d31c50.zip
canvas_display.lv2-44c774021933f0efab8c868acc21bfcdc2d31c50.tar.gz
canvas_display.lv2-44c774021933f0efab8c868acc21bfcdc2d31c50.tar.bz2
canvas_display.lv2-44c774021933f0efab8c868acc21bfcdc2d31c50.tar.xz
optimize for size.
-rw-r--r--CMakeLists.txt15
-rw-r--r--VERSION2
-rw-r--r--cmake/arm-linux-gnueabihf.cmake1
-rw-r--r--cmake/i686-linux-gnu.cmake1
-rw-r--r--cmake/i686-w64-mingw32.cmake1
-rw-r--r--cmake/universal-apple-darwin.cmake1
-rw-r--r--cmake/x86_64-linux-gnu.cmake1
-rw-r--r--cmake/x86_64-w64-mingw32.cmake1
8 files changed, 14 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ae011fa..4f6042f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,14 +7,23 @@ include_directories(${PROJECT_SOURCE_DIR}/pugl)
set(CMAKE_FIND_FRAMEWORK FIRST)
+set(CMAKE_C_FLAGS "-fdata-sections -ffunction-sections ${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS "-std=gnu11 -Wextra -Wno-unused-parameter -ffast-math -fvisibility=hidden ${CMAKE_C_FLAGS}")
-set(CMAKE_C_FLAGS "-Wshadow -Wimplicit-function-declaration -Wmissing-prototypes -Wstrict-prototypes ${CMAKE_C_FLAGS}")
+set(CMAKE_C_FLAGS "-Wshadow -Wimplicit-function-declaration -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes ${CMAKE_C_FLAGS}")
+
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,defs ${CMAKE_MODULE_LINKER_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-z,nodelete ${CMAKE_MODULE_LINKER_FLAGS}")
elseif(WIN32)
set(CMAKE_C_FLAGS "-mstackrealign ${CMAKE_C_FLAGS}")
endif()
+
+if(APPLE)
+ set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-dead_strip ${CMAKE_MODULE_LINKER_FLAGS}")
+else()
+ set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--gc-sections -Wl,-s ${CMAKE_MODULE_LINKER_FLAGS}")
+endif()
+
add_definitions("-D_GNU_SOURCE=1") # asprintf
file(STRINGS "VERSION" CANVAS_VERSION)
@@ -41,7 +50,7 @@ pkg_search_module(CAIRO REQUIRED cairo>=1.14)
include_directories(${CAIRO_INCLUDE_DIRS})
if(DEFINED STATIC_CAIRO)
set(LIBS ${STATIC_CAIRO} ${STATIC_PIXMAN} ${LIBS})
- set(LIBS_UI ${STATIC_CAIROX} ${STATIC_PIXMAN} ${LIBS})
+ set(LIBS_UI ${STATIC_CAIRO} ${STATIC_PIXMAN} ${LIBS})
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(LIBS ${LIBS} pthread)
@@ -103,11 +112,13 @@ endif()
add_library(canvas MODULE canvas.c)
target_link_libraries(canvas ${LIBS})
set_target_properties(canvas PROPERTIES PREFIX "")
+set_target_properties(canvas PROPERTIES LINK_FLAGS "-Wl,--entry=lv2_descriptor")
install(TARGETS canvas DESTINATION ${PLUGIN_DEST})
add_library(canvas_ui MODULE ${TAR_UI})
target_link_libraries(canvas_ui ${LIBS_UI})
set_target_properties(canvas_ui PROPERTIES PREFIX "")
+set_target_properties(canvas_ui PROPERTIES LINK_FLAGS "-Wl,--entry=lv2ui_descriptor")
install(TARGETS canvas_ui DESTINATION ${PLUGIN_DEST})
configure_file(${PROJECT_SOURCE_DIR}/manifest.ttl.in ${PROJECT_BINARY_DIR}/manifest.ttl)
diff --git a/VERSION b/VERSION
index 0e74d9d..2ad1623 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.283
+0.1.285
diff --git a/cmake/arm-linux-gnueabihf.cmake b/cmake/arm-linux-gnueabihf.cmake
index 3f33480..ac43290 100644
--- a/cmake/arm-linux-gnueabihf.cmake
+++ b/cmake/arm-linux-gnueabihf.cmake
@@ -18,7 +18,6 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(STATIC_CAIRO "/opt/${TOOLCHAIN}/lib/libcairo.a")
-set(STATIC_CAIROX "/opt/${TOOLCHAIN}/lib/libcairoX.a")
set(STATIC_PIXMAN "/opt/${TOOLCHAIN}/lib/libpixman-1.a")
set(QEMU qemu-arm)
diff --git a/cmake/i686-linux-gnu.cmake b/cmake/i686-linux-gnu.cmake
index 8422326..6148f85 100644
--- a/cmake/i686-linux-gnu.cmake
+++ b/cmake/i686-linux-gnu.cmake
@@ -7,5 +7,4 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
set(STATIC_CAIRO "/opt/${TOOLCHAIN}/lib/libcairo.a")
-set(STATIC_CAIROX "/opt/${TOOLCHAIN}/lib/libcairoX.a")
set(STATIC_PIXMAN "/opt/${TOOLCHAIN}/lib/libpixman-1.a")
diff --git a/cmake/i686-w64-mingw32.cmake b/cmake/i686-w64-mingw32.cmake
index 8160732..df7d2d0 100644
--- a/cmake/i686-w64-mingw32.cmake
+++ b/cmake/i686-w64-mingw32.cmake
@@ -19,7 +19,6 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(STATIC_CAIRO "/opt/${TOOLCHAIN}/lib/libcairo.a")
-set(STATIC_CAIROX "/opt/${TOOLCHAIN}/lib/libcairoX.a")
set(STATIC_PIXMAN "/opt/${TOOLCHAIN}/lib/libpixman-1.a")
set(WINE wine32)
diff --git a/cmake/universal-apple-darwin.cmake b/cmake/universal-apple-darwin.cmake
index 31f2c10..3efab34 100644
--- a/cmake/universal-apple-darwin.cmake
+++ b/cmake/universal-apple-darwin.cmake
@@ -20,5 +20,4 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(STATIC_CAIRO "/opt/${TOOLCHAIN}/lib/libcairo.a")
-set(STATIC_CAIROX "/opt/${TOOLCHAIN}/lib/libcairoX.a")
set(STATIC_PIXMAN "/opt/${TOOLCHAIN}/lib/libpixman-1.a")
diff --git a/cmake/x86_64-linux-gnu.cmake b/cmake/x86_64-linux-gnu.cmake
index 8b09ebf..290d01b 100644
--- a/cmake/x86_64-linux-gnu.cmake
+++ b/cmake/x86_64-linux-gnu.cmake
@@ -4,5 +4,4 @@ set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(TOOLCHAIN "x86_64-linux-gnu")
set(STATIC_CAIRO "/opt/${TOOLCHAIN}/lib/libcairo.a")
-set(STATIC_CAIROX "/opt/${TOOLCHAIN}/lib/libcairoX.a")
set(STATIC_PIXMAN "/opt/${TOOLCHAIN}/lib/libpixman-1.a")
diff --git a/cmake/x86_64-w64-mingw32.cmake b/cmake/x86_64-w64-mingw32.cmake
index bbf5392..d699ad3 100644
--- a/cmake/x86_64-w64-mingw32.cmake
+++ b/cmake/x86_64-w64-mingw32.cmake
@@ -19,7 +19,6 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(STATIC_CAIRO "/opt/${TOOLCHAIN}/lib/libcairo.a")
-set(STATIC_CAIROX "/opt/${TOOLCHAIN}/lib/libcairoX.a")
set(STATIC_PIXMAN "/opt/${TOOLCHAIN}/lib/libpixman-1.a")
set(WINE wine64)