Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
open_class_api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CLASS_API
open_class_api
Commits
3c144fa8
Commit
3c144fa8
authored
Aug 30, 2022
by
Querejeta Lomas, Leire
Browse files
Options
Downloads
Patches
Plain Diff
Subir nuevo archivo
parent
6485aa73
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/api/class/CMakeLists.txt
+71
-0
71 additions, 0 deletions
src/api/class/CMakeLists.txt
with
71 additions
and
0 deletions
src/api/class/CMakeLists.txt
0 → 100644
+
71
−
0
View file @
3c144fa8
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.6
)
project
(
class
)
message
(
"cmake:
${
PROJECT_NAME
}
"
)
if
(
DEBUG_CMAKE
)
set
(
CMAKE_VERBOSE_MAKEFILE yes
)
endif
(
DEBUG_CMAKE
)
find_package
(
PythonLibs REQUIRED
)
include_directories
(
include
${
Boost_INCLUDE_DIRS
}
${
YAML_INCLUDE_DIR
}
${
PYTHON_INCLUDE_DIRS
}
)
link_directories
(
${
Boost_LIBRARY_DIRS
}
${
YAML_CPP_LIBRARY_DIRS
}
)
set
(
class_api_files
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/class.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/class_core.cpp
#${CMAKE_CURRENT_SOURCE_DIR}/src/class_core.hpp
)
include
(
GenerateExportHeader
)
add_library
(
class SHARED
${
class_api_files
}
${
logger_files
}
${
communication_files
}
${
yaml_tools_files
}
${
filter_files
}
)
GENERATE_EXPORT_HEADER
(
class
# BASE_NAME class
# EXPORT_MACRO_NAME class_EXPORT
EXPORT_FILE_NAME class/class_Export.h
# STATIC_DEFINE class_BUILT_AS_STATIC
)
set_target_properties
(
class PROPERTIES FOLDER class
)
target_include_directories
(
class PUBLIC
${
logger_SOURCE_DIR
}
/include
${
communication_SOURCE_DIR
}
/include
${
yaml_tools_SOURCE_DIR
}
/include
${
filter_SOURCE_DIR
}
/include
${
PROJECT_SOURCE_DIR
}
)
add_dependencies
(
class yaml-cpp
)
target_link_libraries
(
class yaml-cpp
${
Boost_LIBRARIES
}
communication logger filter
${
PYTHON_LIBRARIES
}
)
target_link_libraries
(
class
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../commands.lib
)
target_include_directories
(
class PUBLIC
${
CMAKE_CURRENT_BINARY_DIR
}
)
# 'make install' to the correct location
install
(
TARGETS class
ARCHIVE DESTINATION class_api/lib/cpp
LIBRARY DESTINATION class_api/lib/cpp
RUNTIME DESTINATION class_api/lib/cpp
)
# This is for Windows
install
(
DIRECTORY include/ DESTINATION class_api/include
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/class/class_Export.h DESTINATION class_api/include/class
)
if
(
WIN32
)
install
(
FILES
${
PYTHON_LIBRARIES
}
/../../python37.dll DESTINATION class_api/lib/cpp
)
endif
(
WIN32
)
export
(
TARGETS class
logger
yaml_tools
yaml-cpp
communication
filter
FILE class_Config.cmake
)
\ No newline at end of file
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