SET( CFILES_OBJECT_CONFIG_GEN_PUBLIC
	${GENDIR}oyConfig_s.c
	${GENDIR}oyConfigs_s.c
	${GENDIR}oyProfile_s.c
	${GENDIR}oyProfiles_s.c
	${GENDIR}oyProfileTag_s.c
	${GENDIR}${PACKAGE_NAME}_devices.c
	${GENDIR}${PACKAGE_NAME}_devices_internal.c
	${GENDIR}${PACKAGE_NAME}_profile.c
   )
SET( CFILES_OBJECT_CONFIG_GEN_PUBLIC ${CFILES_OBJECT_CONFIG_GEN_PUBLIC} PARENT_SCOPE )
SET( CFILES_OBJECT_CONFIG_GEN
	${CFILES_OBJECT_CONFIG_GEN_PUBLIC}
	${GENDIR}oyConfig_s_.c
	${GENDIR}oyConfigs_s_.c
	${GENDIR}oyProfile_s_.c
	${GENDIR}oyProfiles_s_.c
	${GENDIR}oyProfileTag_s_.c
   )
SET( CFILES_OBJECT_CONFIG_PUBLIC
	${PACKAGE_NAME}.c
	${PACKAGE_NAME}_db.c
	${PACKAGE_NAME}_color.c
	${PACKAGE_NAME}_icc.c
	${PACKAGE_NAME}_texts.c
   )
SET( CFILES_OBJECT_CONFIG_PUBLIC ${CFILES_OBJECT_CONFIG_PUBLIC} PARENT_SCOPE )
IF( ${PLATFORM} MATCHES OSX )
  SET( CFILES_OBJECT_CONFIG_CS ${PACKAGE_NAME}_cs.c )
ENDIF()
SET( CFILES_OBJECT_CONFIG
	${CFILES_OBJECT_CONFIG_PUBLIC}
	${PACKAGE_NAME}_check.c
	${PACKAGE_NAME}_io.c
	${PACKAGE_NAME}_widgets.c
	${PACKAGE_NAME}_sentinel.c
	${PACKAGE_NAME}_xml.c
	${CFILES_OBJECT_CONFIG_GEN}
	${CFILES_OBJECT_CONFIG_CS}
   )
SET( CHEADERS_OBJECT_CONFIG_PUBLIC
	${GENDIR}oyConfig_s.h
	${GENDIR}oyConfigs_s.h
	${GENDIR}oyProfile_s.h
	${GENDIR}oyProfiles_s.h
	${GENDIR}oyProfileTag_s.h
	${GENDIR}${PACKAGE_NAME}_devices.h
	../include/icc34.h
	../include/${PACKAGE_NAME}.h
	../include/${PACKAGE_NAME}_color.h
	../include/${PACKAGE_NAME}_icc.h
   )
SET( CHEADERS_OBJECT_CONFIG_PUBLIC ${CHEADERS_OBJECT_CONFIG_PUBLIC} PARENT_SCOPE )
SET( CHEADERS_OBJECT_CONFIG
	${GENDIR}oyConfig_s_.h
	${GENDIR}oyConfigs_s_.h
	${GENDIR}oyProfile_s_.h
	${GENDIR}oyProfiles_s_.h
	${GENDIR}oyProfileTag_s_.h
	${GENDIR}${PACKAGE_NAME}_devices_internal.h
	${CHEADERS_OBJECT_CONFIG_PUBLIC}
   )



SET( SOURCES ${CFILES_OBJECT_CONFIG} ${CHEADERS_OBJECT_CONFIG} )

SET( EXTRA_LIBS_CONFIG ${EXTRA_LIBS_CONFIG} PARENT_SCOPE )

IF(APPLE)
   INCLUDE_DIRECTORIES ( /Developer/Headers/FlatCarbon )
   FIND_LIBRARY( CARBON_LIBRARY Carbon )
   FIND_LIBRARY( IOKIT_LIBRARY IOKit )
   MARK_AS_ADVANCED( CARBON_LIBRARY )
   MARK_AS_ADVANCED( IOKIT_LIBRARY )
   SET(EXTRA_LIBS_CS ${CARBON_LIBRARY} ${IOKIT_LIBRARY})
ENDIF (APPLE)

ADD_LIBRARY( ${PROJECT_NAME}Config SHARED ${SOURCES} )
TARGET_LINK_LIBRARIES (
   ${PROJECT_NAME}Config
   ${PROJECT_NAME}Modules ${PROJECT_NAME}Object ${PROJECT_NAME}Core ${EXTRA_LIBS_CONFIG} ${EXTRA_LIBS_CS} )
ADD_LIBRARY( oyranos_config-static STATIC ${SOURCES} )
TARGET_LINK_LIBRARIES (
   oyranos_config-static
   oyranos_modules-static oyranos_object-static oyranos_core-static ${EXTRA_LIBS_CONFIG} ${EXTRA_LIBS_CS} )

# OS X Framework
SET_TARGET_PROPERTIES( ${PROJECT_NAME}Config PROPERTIES
  FRAMEWORK TRUE
  FRAMEWORK_VERSION ${OYRANOS_VERSION}
  PRIVATE_HEADER ""
  PUBLIC_HEADER "${CHEADERS_OBJECT_CONFIG_PUBLIC}"
  RESOURCE ""
#  INSTALL_NAME_DIR "@executable_path/../../../../${FRAMEWORK_DIR}"
#  DEBUG_POSTFIX -d
)

INSTALL( TARGETS ${PROJECT_NAME}Config oyranos_config-static
         RUNTIME DESTINATION bin
         FRAMEWORK DESTINATION ${FRAMEWORK_DIR}
         LIBRARY DESTINATION ${LIB_DIR}
         ARCHIVE DESTINATION lib${LIB_SUFFIX}
         PUBLIC_HEADER DESTINATION include/${PACKAGE_NAME}
       )

