CMakeLists.txt

changeset 46
07578e081ae8
parent 44
d0bf58f3560f
child 47
4a0ad0a08ea1
equal deleted inserted replaced
45:f5b526a3423a 46:07578e081ae8
11 find_package (Qt4 REQUIRED) 11 find_package (Qt4 REQUIRED)
12 endif() 12 endif()
13 13
14 include_directories (${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) 14 include_directories (${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
15 15
16 set (ZCINEMA_SOURCES 16 set (ZCINEMA_LAUNCHER_SOURCES
17 src/demo.cpp 17 launcher/demo.cpp
18 src/main.cpp 18 launcher/main.cpp
19 src/prompts.cpp 19 launcher/prompts.cpp
20 ) 20 )
21 21
22 set (ZCINEMA_COMMON_SOURCES 22 set (ZCINEMA_COMMON_SOURCES
23 src-common/config.cpp 23 commonlib/config.cpp
24 src-common/misc.cpp 24 commonlib/misc.cpp
25 src-common/version.cpp 25 commonlib/version.cpp
26 ) 26 )
27 27
28 set (ZCINEMA_CONFIG_SOURCES 28 set (ZCINEMA_CONFIG_SOURCES
29 src-config/configwindow.cpp 29 config/configwindow.cpp
30 src-config/addversionprompt.cpp 30 config/addversionprompt.cpp
31 src-config/main.cpp 31 config/main.cpp
32 ) 32 )
33 33
34 set (ZCINEMA_HEADERS 34 set (ZCINEMA_HEADERS
35 src-common/config.h 35 commonlib/config.h
36 src-common/misc.h 36 commonlib/misc.h
37 src-common/types.h 37 commonlib/types.h
38 src-common/version.h 38 commonlib/version.h
39 src-config/addversionprompt.h 39 config/addversionprompt.h
40 src-config/configwindow.h 40 config/configwindow.h
41 src/demo.h 41 launcher/demo.h
42 src/prompts.h 42 launcher/prompts.h
43 ) 43 )
44 44
45 set (ZCINEMA_FORMS 45 set (ZCINEMA_FORMS
46 ui/findfile.ui 46 ui/findfile.ui
47 ui/demoprompt.ui 47 ui/demoprompt.ui
48 ui/unknownversion.ui 48 ui/unknownversion.ui
49 ui/versionEditor.ui
50 ui/configbox.ui 49 ui/configbox.ui
51 ui/addversion.ui 50 ui/addversion.ui
52 ) 51 )
53 52
54 set (ZCINEMA_RESOURCES zcinema.qrc) 53 set (ZCINEMA_RESOURCES zcinema.qrc)
56 if (NOT MSVC) 55 if (NOT MSVC)
57 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall") 56 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall")
58 endif() 57 endif()
59 58
60 include_directories ("${PROJECT_BINARY_DIR}") 59 include_directories ("${PROJECT_BINARY_DIR}")
61 include_directories ("${PROJECT_SOURCE_DIR}/src") 60 include_directories ("${PROJECT_SOURCE_DIR}")
62 include_directories ("${PROJECT_BINARY_DIR}/src")
63 include_directories ("${PROJECT_SOURCE_DIR}/src-common")
64 include_directories ("${PROJECT_BINARY_DIR}/src-common")
65 include_directories ("${PROJECT_SOURCE_DIR}/src-config")
66 include_directories ("${PROJECT_BINARY_DIR}/src-config")
67 61
68 if (USE_QT5) 62 if (USE_QT5)
69 qt5_generate_moc (ZCINEMA_MOC ${ZCINEMA_HEADERS}) 63 qt5_generate_moc (ZCINEMA_MOC ${ZCINEMA_HEADERS})
70 qt5_add_resources (ZCINEMA_QRC ${ZCINEMA_RESOURCES}) 64 qt5_add_resources (ZCINEMA_QRC ${ZCINEMA_RESOURCES})
71 qt5_wrap_ui (ZCINEMA_FORMS_HEADERS ${ZCINEMA_FORMS}) 65 qt5_wrap_ui (ZCINEMA_FORMS_HEADERS ${ZCINEMA_FORMS})
85 ${ZCINEMA_MOC} 79 ${ZCINEMA_MOC}
86 ${ZCINEMA_RCC} 80 ${ZCINEMA_RCC}
87 ${ZCINEMA_FORMS_HEADERS}) 81 ${ZCINEMA_FORMS_HEADERS})
88 endif() 82 endif()
89 83
90 add_executable (${PROJECT_NAME} WIN32 ${ZCINEMA_SOURCES}) 84 add_executable (${PROJECT_NAME} WIN32 ${ZCINEMA_LAUNCHER_SOURCES})
91 add_executable (${PROJECT_NAME}-config WIN32 ${ZCINEMA_CONFIG_SOURCES}) 85 add_executable (${PROJECT_NAME}-config WIN32 ${ZCINEMA_CONFIG_SOURCES})
92 86
93 if (USE_QT5) 87 if (USE_QT5)
94 target_link_libraries (${PROJECT_NAME}-common Qt5::Widgets) 88 target_link_libraries (${PROJECT_NAME}-common Qt5::Widgets)
95 else() 89 else()

mercurial