message (STATUS "Preparing Hammer Core library.")


add_library (Core
             Event.cc
			 Hammer.cc
			 Process.cc
			 Histos.cc
			 DictionaryManager.cc
			 )

target_include_directories(Core PRIVATE ${PROJECT_SOURCE_DIR}/include
											 ${PROJECT_BINARY_DIR}/include)
set_target_properties(Core PROPERTIES POSITION_INDEPENDENT_CODE ${Hammer_PIC})
SET_TARGET_PROPERTIES(Core PROPERTIES VERSION ${Hammer_VERSION})
SET_TARGET_PROPERTIES(Core PROPERTIES SOVERSION ${Hammer_VERSION})
target_compile_options(Core PRIVATE ${Hammer_CompileOptions})
if(VERBOSE_DEBUG)
	target_compile_options(Core PRIVATE ${Hammer_VerboseOptions})
	if(VERY_VERBOSE_DEBUG)
		target_compile_options(Core PRIVATE ${Hammer_SanitizeOptions})
	endif()
endif()
if(TARGET ThirdParty::ROOT)
target_link_libraries(Core Tools Base Amplitudes FormFactors ThirdParty::ROOT)
else()
target_link_libraries(Core Tools Base Amplitudes FormFactors)
endif()

if(SANITIZE)
	add_sanitizers(Core)
endif()

install (TARGETS Core DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/Hammer)
