Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_backend_opencv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
aidge
aidge_backend_opencv
Commits
793b2622
Commit
793b2622
authored
11 months ago
by
Grégoire Kubler
Committed by
Maxence Naud
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
feat : project is now correctly initialized
parent
854ee756
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!18
v0.1.3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+19
-18
19 additions, 18 deletions
CMakeLists.txt
with
19 additions
and
18 deletions
CMakeLists.txt
+
19
−
18
View file @
793b2622
cmake_minimum_required
(
VERSION 3.15
)
cmake_minimum_required
(
VERSION 3.15
)
file
(
READ
"
${
CMAKE_SOURCE_DIR
}
/version.txt"
version
)
file
(
STRINGS
"
${
CMAKE_SOURCE_DIR
}
/version.txt"
version
)
file
(
READ
"
${
CMAKE_SOURCE_DIR
}
/project_name.txt"
project
)
message
(
STATUS
"Project name:
${
project
}
"
)
project
(
aidge_backend_opencv
VERSION
${
version
}
DESCRIPTION
"Opencv implementations of the operators and tensor of aidge framework"
LANGUAGES CXX
)
message
(
STATUS
"Project name:
${
CMAKE_PROJECT_NAME
}
"
)
message
(
STATUS
"Project version:
${
version
}
"
)
message
(
STATUS
"Project version:
${
version
}
"
)
# Note : project name is {project} and python module name is also {project}
# Note : project name is {project} and python module name is also {project}
set
(
module_name _
${
project
}
)
# target name
set
(
module_name _
${
CMAKE_PROJECT_NAME
}
)
# target name
project
(
${
project
}
)
##############################################
##############################################
# Define options
# Define options
...
@@ -92,9 +93,9 @@ endif()
...
@@ -92,9 +93,9 @@ endif()
# Installation instructions
# Installation instructions
include
(
GNUInstallDirs
)
include
(
GNUInstallDirs
)
set
(
INSTALL_CONFIGDIR
${
CMAKE_INSTALL_LIBDIR
}
/cmake/
${
project
}
)
set
(
INSTALL_CONFIGDIR
${
CMAKE_INSTALL_LIBDIR
}
/cmake/
${
CMAKE_PROJECT_NAME
}
)
install
(
TARGETS
${
module_name
}
EXPORT
${
project
}
-targets
install
(
TARGETS
${
module_name
}
EXPORT
${
CMAKE_PROJECT_NAME
}
-targets
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
...
@@ -105,8 +106,8 @@ install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
...
@@ -105,8 +106,8 @@ install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
#Export the targets to a script
#Export the targets to a script
install
(
EXPORT
${
project
}
-targets
install
(
EXPORT
${
CMAKE_PROJECT_NAME
}
-targets
FILE
"
${
project
}
-targets.cmake"
FILE
"
${
CMAKE_PROJECT_NAME
}
-targets.cmake"
DESTINATION
${
INSTALL_CONFIGDIR
}
DESTINATION
${
INSTALL_CONFIGDIR
}
COMPONENT
${
module_name
}
COMPONENT
${
module_name
}
)
)
...
@@ -115,27 +116,27 @@ install(EXPORT ${project}-targets
...
@@ -115,27 +116,27 @@ install(EXPORT ${project}-targets
include
(
CMakePackageConfigHelpers
)
include
(
CMakePackageConfigHelpers
)
write_basic_package_version_file
(
write_basic_package_version_file
(
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
project
}
-config-version.cmake"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_PROJECT_NAME
}
-config-version.cmake"
VERSION
${
version
}
VERSION
${
version
}
COMPATIBILITY AnyNewerVersion
COMPATIBILITY AnyNewerVersion
)
)
configure_package_config_file
(
"
${
project
}
-config.cmake.in"
configure_package_config_file
(
"
${
CMAKE_PROJECT_NAME
}
-config.cmake.in"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
project
}
-config.cmake"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_PROJECT_NAME
}
-config.cmake"
INSTALL_DESTINATION
${
INSTALL_CONFIGDIR
}
INSTALL_DESTINATION
${
INSTALL_CONFIGDIR
}
)
)
#Install the config, configversion and custom find modules
#Install the config, configversion and custom find modules
install
(
FILES
install
(
FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
project
}
-config.cmake"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_PROJECT_NAME
}
-config.cmake"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
project
}
-config-version.cmake"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_PROJECT_NAME
}
-config-version.cmake"
DESTINATION
${
INSTALL_CONFIGDIR
}
DESTINATION
${
INSTALL_CONFIGDIR
}
)
)
##############################################
##############################################
## Exporting from the build tree
## Exporting from the build tree
export
(
EXPORT
${
project
}
-targets
export
(
EXPORT
${
CMAKE_PROJECT_NAME
}
-targets
FILE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
project
}
-targets.cmake"
)
FILE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_PROJECT_NAME
}
-targets.cmake"
)
##############################################
##############################################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment