1 # The CMake supplied FindNTK delivers NTK_LIBRARIES as a full list of
2 # static and shared libs, with full paths. We really want just a list of
3 # the lib names. This slight perversion defines
4 # NTK_FOUND true or false
5 # NTK_CONFIG ntk-config executable
6 # NTK_FLUID_EXECUTABLE fluid executable
7 # NTK_LDFLAGS a list of libs required for linking
14 find_program (NTK_CONFIG ntk-config)
16 execute_process (COMMAND ${NTK_CONFIG} --use-images --ldflags OUTPUT_VARIABLE NTK_LDFLAGS)
17 execute_process (COMMAND ${NTK_CONFIG} --use-images --includedir OUTPUT_VARIABLE NTK_INCLUDE_DIR)
18 string(STRIP ${NTK_LDFLAGS} NTK_LIBS)
19 string(REPLACE "-l" "" NTK_LIBS ${NTK_LIBS})
20 string(REPLACE " " "; " NTK_LIBS ${NTK_LIBS})
21 #list(APPEND NTK_LIBS ${NTK_LINK_LIBS})
22 find_program (FLTK_FLUID_EXECUTABLE ntk-fluid)
23 if (FLTK_FLUID_EXECUTABLE)
24 # mark_as_advanced(NTK_CONFIG)
25 # mark_as_advanced(NTK_EXECUTABLE)
26 # mark_as_advanced(NTK_LIBRARIES)
29 endif(FLTK_FLUID_EXECUTABLE)
33 # message("NTK_LDFLAGS: ${NTK_LDFLAGS}")
34 # message("NTK_WRAP_UI: ${NTK_WRAP_UI}")
37 if (NOT NTK_FIND_QUIETLY)
38 message(STATUS "found ${NTK_CONFIG}")
39 # message(STATUS "found ${NTK_FLUID_EXECUTABLE}")
40 endif (NOT NTK_FIND_QUIETLY)
42 if (NTK_FIND_REQUIRED)
43 message(FATAL_ERROR "could not find NTK, aborting.")
44 endif (NTK_FIND_REQUIRED)