root/trunk/qt4-gui/src/CMakeLists.txt

Revision 6474, 1.4 kB (checked in by flynd, 5 weeks ago)

Remake of user dialog to have same page handling as settings dialog. Added pages for other user settings and group membership as well.

Line 
1set(SOURCE_DIRS
2  config
3  contactlist
4  core
5  dialogs
6  dockicons
7  helpers
8  settings
9  userdlg
10  userevents
11  views
12  widgets
13)
14
15set(objs)
16foreach (dir ${SOURCE_DIRS})
17  add_subdirectory(${dir})
18
19  # CMake doesn't support "convenience libraries" (yet). This works
20  # around that by getting a list of all object files from each
21  # subdirectory and then linking them directly to the target. Depends
22  # on internal CMake structure and may break in the future. Hopefully
23  # CMake will get "convenience libraries" before that.
24  set(objdir ${CMAKE_CURRENT_BINARY_DIR}/${dir}${CMAKE_FILES_DIRECTORY}/${dir}.dir)
25  get_directory_property(${dir} DIRECTORY ${dir} DEFINITION ${dir})
26  foreach (file ${${dir}})
27    get_filename_component(basename ${file} NAME_WE)
28    list(APPEND objs ${objdir}/${basename}${CMAKE_C_OUTPUT_EXTENSION})
29  endforeach (file)
30endforeach (dir)
31set_source_files_properties(${objs} PROPERTIES GENERATED true)
32
33if (WITH_KDE)
34  set(target licq_kde4-gui)
35else (WITH_KDE)
36  set(target licq_qt4-gui)
37endif (WITH_KDE)
38
39add_library(${target} MODULE ${objs})
40add_dependencies(${target} ${SOURCE_DIRS})
41target_link_libraries(${target} ${LIBRARIES})
42set_target_properties(${target} PROPERTIES PREFIX "")
43set_target_properties(${target} PROPERTIES LINKER_LANGUAGE CXX)
44
45install(TARGETS ${target} DESTINATION ${INSTALL_LIB_DIR}/licq)
46
47if (APPLE)
48  set_target_properties(${target} PROPERTIES
49    LINK_FLAGS "-flat_namespace -undefined suppress")
50endif (APPLE)
Note: See TracBrowser for help on using the browser.