commit e8d9867f1946a1b403172e6cf657c0a728543b25
parent 8798d892d9ad6b149b553660fab785bf6b25f577
Author: fundamental <[email protected]>
Date: Wed, 21 Nov 2012 10:30:50 -0500
Merge remote-tracking branch 'non/master'
Diffstat:
2 files changed, 8 insertions(+), 57 deletions(-)
diff --git a/cmake/FindNTK.cmake b/cmake/FindNTK.cmake
@@ -1,45 +0,0 @@
-# The CMake supplied FindNTK delivers NTK_LIBRARIES as a full list of
-# static and shared libs, with full paths. We really want just a list of
-# the lib names. This slight perversion defines
-# NTK_FOUND true or false
-# NTK_CONFIG ntk-config executable
-# NTK_FLUID_EXECUTABLE fluid executable
-# NTK_LDFLAGS a list of libs required for linking
-#
-
-if (NTK_LDFLAGS)
- # in cache already
- set(NTK_FOUND TRUE)
-else (NTK_LDFLAGS)
- find_program (NTK_CONFIG ntk-config)
- if (NTK_CONFIG)
- execute_process (COMMAND ${NTK_CONFIG} --use-images --ldflags OUTPUT_VARIABLE NTK_LDFLAGS)
- execute_process (COMMAND ${NTK_CONFIG} --use-images --includedir OUTPUT_VARIABLE NTK_INCLUDE_DIR)
- string(STRIP ${NTK_LDFLAGS} NTK_LIBS)
- string(REPLACE "-l" "" NTK_LIBS ${NTK_LIBS})
- string(REPLACE " " "; " NTK_LIBS ${NTK_LIBS})
- #list(APPEND NTK_LIBS ${NTK_LINK_LIBS})
- find_program (NTK_FLUID_EXECUTABLE ntk-fluid)
- if (NTK_FLUID_EXECUTABLE)
-# mark_as_advanced(NTK_CONFIG)
-# mark_as_advanced(NTK_EXECUTABLE)
-# mark_as_advanced(NTK_LIBRARIES)
- set(NTK_FOUND TRUE)
- set(NTK_WRAP_UI 1)
- endif(NTK_FLUID_EXECUTABLE)
- endif (NTK_CONFIG)
-endif (NTK_LDFLAGS)
-
-# message("NTK_LDFLAGS: ${NTK_LDFLAGS}")
-# message("NTK_WRAP_UI: ${NTK_WRAP_UI}")
-
-if (NTK_FOUND)
- if (NOT NTK_FIND_QUIETLY)
- message(STATUS "found ${NTK_CONFIG}")
- # message(STATUS "found ${NTK_FLUID_EXECUTABLE}")
- endif (NOT NTK_FIND_QUIETLY)
-else (NTK_FOUND)
- if (NTK_FIND_REQUIRED)
- message(FATAL_ERROR "could not find NTK, aborting.")
- endif (NTK_FIND_REQUIRED)
-endif (NTK_FOUND)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
@@ -13,7 +13,8 @@ find_package(Alsa)
pkg_check_modules(JACK jack)
pkg_check_modules(PORTAUDIO portaudio-2.0>=19)
set(FLTK_SKIP_OPENGL true)
-find_package(NTK)
+pkg_check_modules(NTK ntk)
+pkg_check_modules(NTK_IMAGES ntk_images)
find_package(FLTK)
find_package(OpenGL) #for FLTK
find_package(CxxTest)
@@ -221,7 +222,7 @@ if(NTK_FOUND)
mark_as_advanced(FORCE NTK_BASE_LIBRARY)
mark_as_advanced(FORCE NTK_CONFIG_SCRIPT)
mark_as_advanced(FORCE NTK_DIR)
- mark_as_advanced(FORCE NTK_FLUID_EXECUTABLE)
+ mark_as_advanced(FORCE FLTK_FLUID_EXECUTABLE)
mark_as_advanced(FORCE NTK_FORMS_LIBRARY)
mark_as_advanced(FORCE NTK_GL_LIBRARY)
mark_as_advanced(FORCE NTK_IMAGES_LIBRARY)
@@ -255,24 +256,19 @@ if(FltkGui)
endif()
if(NtkGui)
- #UGLY WORKAROUND
- find_program (NTK_CONFIG ntk-config)
- if (NTK_CONFIG)
- execute_process (COMMAND ${NTK_CONFIG} --use-images --ldflags OUTPUT_VARIABLE NTK_LDFLAGS)
- string(STRIP ${NTK_LDFLAGS} NTK_LIBRARIES)
- endif()
-
- message(STATUS ${NTK_LDFLAGS})
+ find_program( FLTK_FLUID_EXECUTABLE ntk-fluid)
+
+ message(STATUS ${NTK_LDFLAGS} ${NTK_IMAGES_LDFLAGS})
- set(GUI_LIBRARIES ${NTK_LIBRARIES} ${NTK_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui)
+ set(GUI_LIBRARIES ${NTK_LIBRARIES} ${NTK_IMAGES_LIBRARIES} ${OPENGL_LIBRARIES} zynaddsubfx_gui)
add_definitions(-DNTK_GUI)
message(STATUS "Will build NTK gui")
include_directories(
- ${NTK_INCLUDE_DIR}
+ ${NTK_INCLUDE_DIRS}
"${CMAKE_CURRENT_SOURCE_DIR}/UI"
"${CMAKE_CURRENT_BINARY_DIR}/UI"
)