aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-11-04 20:57:47 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-11-04 20:57:47 +0100
commitae914e4c6072a468792a6f93f0b8875f9be94c45 (patch)
tree1d9f94cc2154680cacd3f1ee8ed794456fea135e /CMakeLists.txt
parent41f046e9479230eda4aaf388c9c282e7b428bfe1 (diff)
downloadsherlock.lv2-ae914e4c6072a468792a6f93f0b8875f9be94c45.tar.xz
prototype nuklear ui.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt34
1 files changed, 32 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ead9152..d75e1d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,11 +7,26 @@ include_directories(${PROJECT_SOURCE_DIR}/libosc)
include_directories(${PROJECT_SOURCE_DIR}/osc.lv2)
include_directories(${PROJECT_SOURCE_DIR}/sandbox_ui.lv2)
include_directories(${PROJECT_SOURCE_DIR}/props.lv2)
+include_directories(${PROJECT_SOURCE_DIR}/pugl)
include_directories(${PROJECT_SOURCE_DIR}/symap)
+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_MODULE_LINKER_FLAGS "-Wl,-z,nodelete ${CMAKE_MODULE_LINKER_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" SHERLOCK_VERSION)
@@ -77,6 +92,20 @@ target_link_libraries(sherlock_eo
set_target_properties(sherlock_eo PROPERTIES PREFIX "")
install(TARGETS sherlock_eo DESTINATION ${DEST})
+add_definitions("-DPUGL_HAVE_GL")
+add_library(sherlock_nk MODULE
+ sherlock_nk.c
+ midi_inspector_nk.c
+ atom_inspector_nk.c
+ osc_inspector_nk.c
+ pugl/pugl/pugl_x11.c)
+target_link_libraries(sherlock_nk
+ ${NANOMSG_LDFLAGS}
+ ${SRATOM_LDFLAGS}
+ X11 GL m)
+set_target_properties(sherlock_nk PROPERTIES PREFIX "")
+install(TARGETS sherlock_nk DESTINATION ${DEST})
+
add_executable(sandbox_efl
${PROJECT_SOURCE_DIR}/sandbox_ui.lv2/sandbox_slave.c
${PROJECT_SOURCE_DIR}/sandbox_ui.lv2/sandbox_efl.c
@@ -92,3 +121,4 @@ install(FILES ${PROJECT_BINARY_DIR}/manifest.ttl DESTINATION ${DEST})
install(FILES ${PROJECT_SOURCE_DIR}/sherlock.ttl DESTINATION ${DEST})
install(FILES ${PROJECT_SOURCE_DIR}/sherlock_ui.ttl DESTINATION ${DEST})
install(FILES ${PROJECT_SOURCE_DIR}/omk_logo_256x256.png DESTINATION ${DEST})
+install(FILES ${PROJECT_SOURCE_DIR}/nuklear/extra_font/Cousine-Regular.ttf DESTINATION ${DEST})