Skip to content

Commit

Permalink
~ update library structure
Browse files Browse the repository at this point in the history
  • Loading branch information
KROIA committed Mar 18, 2024
1 parent 7004acf commit d8fec3a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 21 deletions.
1 change: 0 additions & 1 deletion cmake/ExampleMaster.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cmake_minimum_required(VERSION 3.1.0)

# This functions creates a default example project using the given library
# Function name: exampleMaster
Expand Down
1 change: 0 additions & 1 deletion cmake/QtLocator.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Credits:
# https://stackoverflow.com/questions/15639781/how-to-find-the-qt5-cmake-module-on-windows
cmake_minimum_required(VERSION 3.12)

SET(QT_MISSING True)

Expand Down
2 changes: 0 additions & 2 deletions cmake/dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cmake_minimum_required(VERSION 3.1.0)


set(RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/${RELATIVE_BUILD_FOLDER}")
set(LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/${RELATIVE_BUILD_FOLDER}")
Expand Down
19 changes: 3 additions & 16 deletions cmake/utility.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ endfunction()


# Function name: DEPLOY_QT
# Params: QT_PATH Path to the QT installation. C:\Qt\5.15.2\msvc2015_64
# targetExePath Path to the exe file: "$<TARGET_FILE_DIR:profiler_gui>/$<TARGET_FILE_NAME:profiler_gui>"
# Params: targetName Name of the target created using add_executable(...)
# outputPath Path where the deployment will be done
#
function(DEPLOY_QT targetName outputPath)

Expand Down Expand Up @@ -68,30 +68,17 @@ endfunction()


function(copyLibraryHeaders headerRootFolder destinationPath destinationFolderName)
# Copy the folder
#message("COPY ${headerRootFolder} DESTINATION ${CMAKE_BINARY_DIR}")
# Copy the folder
file(COPY ${headerRootFolder}
DESTINATION ${CMAKE_BINARY_DIR})


get_filename_component(FOLDER_NAME ${headerRootFolder} NAME)
#message("FOLDER_NAME ${FOLDER_NAME}")


#message("REMOVE_RECURSE ${CMAKE_BINARY_DIR}/${destinationFolderName}")
file(REMOVE_RECURSE "${CMAKE_BINARY_DIR}/${destinationFolderName}")



#message("RENAME ${CMAKE_BINARY_DIR}/${FOLDER_NAME}
# ${CMAKE_BINARY_DIR}/${destinationFolderName}")

# Rename the copied folder
file(RENAME ${CMAKE_BINARY_DIR}/${FOLDER_NAME}
${CMAKE_BINARY_DIR}/${destinationFolderName})

#message("DIRECTORY ${CMAKE_BINARY_DIR}/${destinationFolderName}
# DESTINATION ${destinationPath}")
# Install the modified folder
install(DIRECTORY ${CMAKE_BINARY_DIR}/${destinationFolderName}
DESTINATION ${destinationPath})
Expand Down
9 changes: 8 additions & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
##
## This file will build the library in 3 different ways:
## 1. Shared library
## 2. Static library
## 3. Static library with profiling using easy_profiler
## This option is only available if the easy_profiler library is added to the dependencies
##

## USER_SECTION_START 1
cmake_minimum_required(VERSION 3.20)
## USER_SECTION_END
Expand Down Expand Up @@ -159,7 +167,6 @@ if(EASY_PROFILER_IS_AVAILABLE)
else()
install(TARGETS ${LIBRARY_NAME_SHARED} ${LIBRARY_NAME_STATIC} DESTINATION "${INSTALL_BIN_PATH}")
endif()
#install(TARGETS ${LIBRARY_NAME_SHARED} ${LIBRARY_NAME_STATIC} ${LIBRARY_NAME_STATIC_PROFILE} DESTINATION "${INSTALL_LIB_PATH}")

copyLibraryHeaders("${CMAKE_CURRENT_SOURCE_DIR}/${INCLUDE_PATH}" "${CMAKE_INSTALL_PREFIX}/include" "${LIBRARY_NAME}")

Expand Down

0 comments on commit d8fec3a

Please sign in to comment.