phoenix_add_library.cmake 555 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

# Add Shared library with suffix by respect to the program version set with the phoenix_base_project function
# 	targetName : name of the library target to be created
# 	ARGN : list of dependencies
function(phoenix_add_library targetName)
	add_library(${targetName} SHARED ${ARGN})

	string(REPLACE "." ";" PROGRAM_VERSION_LIST ${PROGRAM_VERSION})
	list(GET PROGRAM_VERSION_LIST 0 PROGRAM_VERSION_SO)
	set_target_properties(${targetName} PROPERTIES
		VERSION "${PROGRAM_VERSION}"
		SOVERSION "${PROGRAM_VERSION_SO}")
endfunction(phoenix_add_library)