Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
robotran
mbsysc
Commits
503cb36b
Commit
503cb36b
authored
Jun 08, 2016
by
Timothee Habra
Browse files
clean cmake
parent
90c94495
Changes
4
Hide whitespace changes
Inline
Side-by-side
MBprojects/PendulumSpringC/userfctR/CMakeLists.txt
View file @
503cb36b
...
...
@@ -36,13 +36,11 @@ add_library(Project_userfct SHARED ${SOURCE_FILES})
# MBSysC libraries
if
(
FLAG_SEPARATE_BUILD
)
# find MBSysC dynamic libraries
find_package
(
LibRobotranC REQUIRED
)
target_link_libraries
(
Project_userfct
${
LIB_MBSYSC_REALTIME
}
${
LIB_MBSYSC_UTILITIES
}
)
add_definitions
(
${
LIB_MBSYSC_DEFINITIONS
}
)
else
(
)
#TODO define MBsysC_realtime MBsysC_utilities in mbs_common cmake to avoid this line dublicated (above and below)
target_link_libraries
(
Project_userfct MBsysC_realtime MBsysC_utilities
)
add_definitions
(
${
LIB_MBSYSC_DEFINITIONS
}
)
endif
()
target_link_libraries
(
Project_userfct
${
LIB_MBSYSC_REALTIME
}
${
LIB_MBSYSC_UTILITIES
}
)
if
(
FLAG_PLOT
)
sdl_header_lib
(
userfct
)
endif
(
)
...
...
MBsysC/mbs_common/CMakeLists.txt
View file @
503cb36b
...
...
@@ -83,8 +83,12 @@ SET(LIB_MBSYSC_INCLUDE_DIRS "${ROBOTRAN_SOURCE_DIR}/mbs_common/mbs_struct"
"
${
ROBOTRAN_SOURCE_DIR
}
/mbs_common/mbs_realtime/sdl/auto_plot"
)
configure_file
(
LibRobotranCConfig.cmake.in
"
${
PROJECT_BINARY_DIR
}
/LibRobotranCConfig.cmake"
@ONLY
)
if
(
hasParent
)
#compiled by standalone project
SET
(
LIB_MBSYSC_INCLUDE_DIRS
${
LIB_MBSYSC_INCLUDE_DIRS
}
PARENT_SCOPE
)
else
()
# compile as a library (in separate build
)
configure_file
(
LibRobotranCConfig.cmake.in
"
${
PROJECT_BINARY_DIR
}
/LibRobotranCConfig.cmake"
@ONLY
)
SET
(
LIB_MBSYSC_REALTIME
${
LIB_MBSYSC_REALTIME
}
PARENT_SCOPE
)
SET
(
LIB_MBSYSC_UTILITIES
${
LIB_MBSYSC_UTILITIES
}
PARENT_SCOPE
)
endif
()
MBsysC/mbs_common/mbs_realtime/CMakeLists.txt
View file @
503cb36b
...
...
@@ -66,6 +66,8 @@ endif ()
init_include
()
set
(
INCLUDE_DIR
${
INCLUDE_DIR
}
${
PROJECT_SOURCE_DIR
}
/realtime PARENT_SCOPE
)
set
(
LIB_MBSYSC_REALTIME MBsysC_realtime
)
set
(
LIB_MBSYSC_REALTIME
${
LIB_MBSYSC_REALTIME
}
PARENT_SCOPE
)
add_library
(
MBsysC_realtime SHARED
${
SOURCE_FILES
}
${
INCLUDE_DIR
}
)
target_link_libraries
(
MBsysC_realtime MBsysC_utilities
)
...
...
MBsysC/mbs_common/mbs_utilities/CMakeLists.txt
View file @
503cb36b
...
...
@@ -22,6 +22,9 @@ init_include()
set
(
INCLUDE_DIR
${
INCLUDE_DIR
}
${
PROJECT_SOURCE_DIR
}
PARENT_SCOPE
)
set
(
INCLUDE_DIR
${
INCLUDE_DIR
}
${
PROJECT_SOURCE_DIR
}
/auto_output PARENT_SCOPE
)
set
(
LIB_MBSYSC_UTILITIES MBsysC_utilities
)
set
(
LIB_MBSYSC_UTILITIES
${
LIB_MBSYSC_UTILITIES
}
PARENT_SCOPE
)
if
(
FLAG_SHARED_LIB
)
include
(
GenerateExportHeader
)
add_library
(
MBsysC_utilities SHARED
${
SOURCE_FILES
}
${
INCLUDE_DIR
}
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment