-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tidy up cmake for plotting and bring it more in line with other MaCh3…
… libraries. Also now include it as part of MaCh3::All target
- Loading branch information
Showing
5 changed files
with
41 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,35 @@ | ||
set( HEADERS | ||
plottingManager.h | ||
inputManager.h | ||
styleManager.h | ||
plottingUtils.h | ||
) | ||
|
||
## build the base level library targets | ||
foreach(lib | ||
inputManager | ||
styleManager | ||
plottingUtils | ||
) | ||
add_library( ${lib} ${lib}.cpp ) | ||
target_link_libraries( ${lib} ${ROOT_LIBRARIES} MaCh3::Manager ) | ||
add_library( Plotting SHARED | ||
plottingManager.cpp | ||
inputManager.cpp | ||
styleManager.cpp | ||
plottingUtils.cpp | ||
) | ||
|
||
set_property( TARGET ${lib} PROPERTY POSITION_INDEPENDENT_CODE ON ) | ||
set_target_properties( Plotting PROPERTIES | ||
PUBLIC_HEADER "${HEADERS}" | ||
EXPORT_NAME Plotting | ||
) | ||
|
||
endforeach(lib) | ||
target_link_libraries( Plotting ${ROOT_LIBRARIES} MaCh3::Manager ) | ||
|
||
## to be compiled into python module needs to be compiled as position independent library | ||
if( MaCh3_PYTHON_ENABLED ) | ||
|
||
## build the higher level plottingManager | ||
add_library( plottingManager plottingManager.cpp plottingManager.h ) | ||
set_property( TARGET plottingManager PROPERTY POSITION_INDEPENDENT_CODE ON ) | ||
target_link_libraries( plottingManager inputManager styleManager ) | ||
set_property( TARGET Plotting PROPERTY POSITION_INDEPENDENT_CODE ON ) | ||
|
||
endif() | ||
|
||
## chuck it all together into the Plotting library | ||
add_library( Plotting INTERFACE ) | ||
target_link_libraries( Plotting INTERFACE inputManager plottingManager styleManager plottingUtils ) | ||
install(TARGETS Plotting | ||
EXPORT MaCh3-targets | ||
LIBRARY DESTINATION lib/ | ||
PUBLIC_HEADER DESTINATION include/plotting | ||
) | ||
|
||
add_library(MaCh3::Plotting ALIAS Plotting) |