Skip to content

Commit

Permalink
cmake fixes, release build coming
Browse files Browse the repository at this point in the history
  • Loading branch information
C.D. MacEachern committed Feb 26, 2021
1 parent 5bd2e74 commit 0c9f814
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ log.txt.DS_Store
build/
CMakeLists.txt.user
build-*/
.cache/
12 changes: 2 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
cmake_minimum_required(VERSION 3.14)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

if (WIN32)
project(openroll LANGUAGES CXX)
elseif(UNIX)
project(openroll)
endif()

set(CMAKE_CONFIGURATION_TYPES "Release;RelWithDebInfo" CACHE STRING "" FORCE)

#======================= INCLUSION OF Qt =======================#
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
Expand All @@ -21,7 +20,6 @@ find_package(Qt5Core REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Multimedia REQUIRED)

#=================== INCLUSION OF Project Files ====================#
set(FORMS_DIR "${CMAKE_SOURCE_DIR}/forms")
set(INCLUDE_DIR "${CMAKE_SOURCE_DIR}/include")
set(SOURCE_DIR "${CMAKE_SOURCE_DIR}/src")
Expand All @@ -37,12 +35,6 @@ file(GLOB_RECURSE SOURCES
"${SOURCE_DIR}/*.cpp"
)

#=================== SETUP EXECTUABLE ====================#
# Enable debug logging on RELWITHDEBINFO configuration
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
$<$<CONFIG:RELWITHDEBINFO>:QT_MESSAGELOGCONTEXT>
)

# Add the forms directory to the AUTOUIC search paths
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_AUTOUIC_SEARCH_PATHS} ${FORMS_DIR})

Expand Down
1 change: 0 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ int main(int argc, char *argv[]) {
qInfo() << "Using log file named: " << logger::filename;
logger::attach();
#endif

return QApplication::exec();
}

0 comments on commit 0c9f814

Please sign in to comment.