CMakeLists.txt

changeset 92
c438a7db7c52
parent 89
7abaf1d64719
parent 90
e234edb5e613
child 94
164f53fb5921
equal deleted inserted replaced
89:7abaf1d64719 92:c438a7db7c52
9 endif() 9 endif()
10 find_package(Qt5Core REQUIRED) 10 find_package(Qt5Core REQUIRED)
11 find_package(Qt5OpenGL REQUIRED) 11 find_package(Qt5OpenGL REQUIRED)
12 find_package(Qt5Network REQUIRED) 12 find_package(Qt5Network REQUIRED)
13 find_package(Qt5LinguistTools REQUIRED) 13 find_package(Qt5LinguistTools REQUIRED)
14 find_package(GLUT REQUIRED)
15 find_package(GLM REQUIRED) 14 find_package(GLM REQUIRED)
16 set(CMAKE_AUTOMOC ON) 15 set(CMAKE_AUTOMOC ON)
17 set(CMAKE_AUTOUIC ON) 16 set(CMAKE_AUTOUIC ON)
18 set(CMAKE_AUTORCC ON) 17 set(CMAKE_AUTORCC ON)
19 find_package(OpenGL REQUIRED) 18 find_package(OpenGL REQUIRED)
20 include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR}) 19 include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
21 include_directories(${GLUT_INCLUDE_DIR})
22 include_directories(${GLM_INCLUDE_DIR}) 20 include_directories(${GLM_INCLUDE_DIR})
21 source_group("1 Foundation code" REGULAR_EXPRESSION "src/.+\\.(cpp|h)")
22 source_group("4 OpenGL renderer" REGULAR_EXPRESSION "src/gl/.+\\.(cpp|h)")
23 source_group("5 LDraw line types" REGULAR_EXPRESSION "src/linetypes/.+\\.(cpp|h)")
24 source_group("3 UI and widgets" REGULAR_EXPRESSION "src/(ui|widgets)/.+\\.(cpp|h)")
25 source_group("3.1 Settings editor" REGULAR_EXPRESSION "src/settingseditor/.+\\.(cpp|h)")
26 source_group("3.2 Main UI" REGULAR_EXPRESSION "src/(mainwindow|document|documentmanager|uiutilities)\\.(cpp|h)")
27 source_group("2 Model handling" REGULAR_EXPRESSION "src/(model|modeleditcontext|libraries|colors|parser)\\.(cpp|h)")
23 28
24 set (LDFORGE_SOURCES 29 set (LDFORGE_SOURCES
25 src/colors.cpp 30 src/colors.cpp
26 src/document.cpp 31 src/document.cpp
27 src/documentmanager.cpp 32 src/documentmanager.cpp
179 set_source_files_properties(${LDFORGE_HEADERS} PROPERTIES HEADER_FILE_ONLY TRUE) 184 set_source_files_properties(${LDFORGE_HEADERS} PROPERTIES HEADER_FILE_ONLY TRUE)
180 set_source_files_properties(${LDFORGE_RESOURCES} PROPERTIES HEADER_FILE_ONLY TRUE) 185 set_source_files_properties(${LDFORGE_RESOURCES} PROPERTIES HEADER_FILE_ONLY TRUE)
181 set_source_files_properties(${LDFORGE_OTHER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) 186 set_source_files_properties(${LDFORGE_OTHER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE)
182 set_target_properties(ldforge PROPERTIES AUTOMOC 1) 187 set_target_properties(ldforge PROPERTIES AUTOMOC 1)
183 target_link_libraries(ldforge Qt5::Widgets Qt5::Network Qt5::OpenGL ${OPENGL_LIBRARIES}) 188 target_link_libraries(ldforge Qt5::Widgets Qt5::Network Qt5::OpenGL ${OPENGL_LIBRARIES})
184 target_link_libraries(ldforge ${GLUT_LIBRARIES})
185 add_dependencies(ldforge resources) 189 add_dependencies(ldforge resources)
186 cotire(ldforge) 190 cotire(ldforge)
187 191
188 add_custom_target (config_collection ALL 192 add_custom_target (config_collection ALL
189 COMMAND python3 193 COMMAND python3

mercurial