Remove unnecessary inclusion of headers in add_executable/library() calls
[centerim5.git] / src / CMakeLists.txt
blobfdc3254271c3e8586390451ed3fc10a71d4c2f86
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 add_executable(centerim5 ${centerim5_SOURCES})
27 include_directories("${centerim5_BINARY_DIR}/src")
29 add_custom_target(git-version.h VERBATIM
30   COMMAND sh -c "cd \"${centerim5_SOURCE_DIR}\"; \
31     version=`misc/git-version-gen .tarball-version`; \
32     cd \"${CMAKE_CURRENT_BINARY_DIR}\"; \
33     if test \"$version\" != \"`cat .version 2> /dev/null`\"; then \
34       printf '%s' \"$version\" > .version; \
35       sed -e \"s/@GIT_VERSION@/`cat .version`/\" \
36         < \"${CMAKE_CURRENT_SOURCE_DIR}/git-version.h.in\" > git-version.h; \
37     fi")
39 add_dependencies(centerim5 git-version.h)
41 set_property(TARGET centerim5
42   PROPERTY INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
43 target_compile_options(centerim5 PRIVATE
44   ${PURPLE_CFLAGS} ${GLIB2_CFLAGS} ${SIGC_CFLAGS})
45 target_link_libraries(centerim5 PRIVATE
46   ${PURPLE_LDFLAGS} ${GLIB2_LDFLAGS} ${SIGC_LDFLAGS} cppconsui)
48 install(TARGETS centerim5 DESTINATION bin)