Use correct package prefix for local macros in configure.ac
[centerim5.git] / src / CMakeLists.txt
blobddb01fe17ce6eb9beb05b6b0a568ffe08050c452
1 # When you add files here, also add them in po/POTFILES.in.
2 set(centerim5_SOURCES
3   AccountStatusMenu.cpp
4   AccountWindow.cpp
5   Accounts.cpp
6   BuddyList.cpp
7   BuddyListNode.cpp
8   CenterIM.cpp
9   Connections.cpp
10   Conversation.cpp
11   ConversationRoomList.cpp
12   Conversations.cpp
13   Footer.cpp
14   GeneralMenu.cpp
15   Header.cpp
16   Log.cpp
17   Notify.cpp
18   OptionWindow.cpp
19   PluginWindow.cpp
20   Request.cpp
21   Transfers.cpp
22   Utils.cpp
23   git-version.cpp)
25 set(centerim5_HEADERS
26   AccountStatusMenu.h
27   AccountWindow.h
28   Accounts.h
29   BuddyList.h
30   BuddyListNode.h
31   CenterIM.h
32   Connections.h
33   Conversation.h
34   ConversationRoomList.h
35   Conversations.h
36   Footer.h
37   GeneralMenu.h
38   Header.h
39   Log.h
40   Notify.h
41   OptionWindow.h
42   PluginWindow.h
43   Request.h
44   Transfers.h
45   Utils.h
46   git-version.h.in)
48 include_directories("${centerim5_BINARY_DIR}/src")
50 add_custom_target(git-version.h ALL VERBATIM
51   COMMAND sh -c "cd \"${centerim5_SOURCE_DIR}\"; version=`misc/git-version-gen .tarball-version`; cd \"${CMAKE_CURRENT_BINARY_DIR}\"; if test \"$version\" != \"`cat .version 2> /dev/null`\"; then printf '%s' \"$version\" > .version; sed -e \"s/@GIT_VERSION@/`cat .version`/\" < \"${CMAKE_CURRENT_SOURCE_DIR}/git-version.h.in\" > git-version.h; fi")
53 add_executable(centerim5
54   ${centerim5_SOURCES}
55   ${centerim5_HEADERS})
57 add_dependencies(centerim5 git-version.h)
59 set_property(TARGET centerim5
60   PROPERTY INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
61 target_compile_options(centerim5 PRIVATE
62   ${PURPLE_CFLAGS} ${GLIB2_CFLAGS} ${SIGC_CFLAGS})
63 target_link_libraries(centerim5 PRIVATE
64   ${PURPLE_LDFLAGS} ${GLIB2_LDFLAGS} ${SIGC_LDFLAGS} cppconsui)
66 install(TARGETS centerim5 DESTINATION bin)