Skip to content
Snippets Groups Projects
Commit 3c144fa8 authored by Querejeta Lomas, Leire's avatar Querejeta Lomas, Leire
Browse files

Subir nuevo archivo

parent 6485aa73
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment